Skip to content

Base64URL Encoder

Turn any text into a Base64URL string that can be pasted straight into a URL, a filename or a JWT segment.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is Base64URL Encoder?

Base64URL is the variant of Base64 defined in RFC 4648 section 5. It replaces "+" with "-" and "/" with "_", and normally drops the trailing "=" padding, so the result never needs percent-encoding when placed in a URL, a cookie, a filename or an HTTP header.

This tool converts your text to UTF-8 bytes first, so accents, CJK characters and emoji are safe, then applies the URL-safe alphabet. Padding is off by default because that is what JWTs, WebAuthn and most APIs expect.

How does it work?

  1. Type or paste the text to encode; the Base64URL string is produced as you type.
  2. Tick "Add = padding" only if the receiving system insists on a length that is a multiple of 4.
  3. Copy the result, or press Swap to decode a Base64URL value in the decoder.

Common use cases

  • Building the header or payload segment of a JWT by hand while testing an API.
  • Putting a small JSON blob into a query-string parameter without extra escaping.
  • Generating URL-safe identifiers or state values for OAuth redirect experiments.
  • Creating filenames or cache keys derived from text without slashes or plus signs.

Examples

Try this input in the tool above:

Input
Hello, Base64URL! >>>???
Output
SGVsbG8sIEJhc2U2NFVSTCEgPj4-Pz8_

Privacy

Base64URL Encoder runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Base64URL is an encoding, not encryption: anyone can reverse it. It also makes data about 33% larger.

Frequently asked questions

What is the difference between Base64 and Base64URL?

Only two characters and the padding: Base64URL uses "-" and "_" instead of "+" and "/", and usually omits "=". The underlying 6-bit grouping is identical.

Why is there no "=" at the end of my result?

Padding is optional in RFC 4648 §5 and JWTs forbid it. Turn on "Add = padding" if a strict decoder needs it.

Can I encode emoji and accented text?

Yes. The text is converted to UTF-8 first, so characters such as é, 世 or 😀 decode back exactly.

More tools in Encoding & Decoding →