Base64URL Encoder

Encode and decode using Base64URL, the URL-safe variant of Base64.

Base64 that's safe in a URL

Standard Base64 uses a couple of characters — the plus sign and the forward slash — that have special meaning in URLs and can break them. Base64URL swaps those for URL-safe alternatives and drops the padding, so the result travels cleanly in a web address, a query parameter or a token. This encodes and decodes in that URL-safe variant.

Paste input to encode it URL-safely, or Base64URL to decode it.

Where you'll meet it

Base64URL is the encoding used inside JSON Web Tokens and many other web contexts precisely because those values end up in URLs and headers where the standard characters would cause trouble. The difference from ordinary Base64 is small but real — the swapped characters and the missing padding mean the two are not interchangeable, and feeding one to a decoder expecting the other fails. When a value comes from a token or a URL, Base64URL is very often the variant you need.

Common questions

How does Base64URL differ from Base64?

It replaces the plus and slash characters with URL-safe ones and drops padding, so it travels cleanly in URLs and tokens.

Where is Base64URL used?

Inside JSON Web Tokens and many web contexts where the encoded value ends up in a URL or header.

Is my data uploaded?

No. The encoding happens in your browser.

More Developer tools