Input

Output

Formatted result will be displayed here

What is URL-safe Base64?

Standard Base64 uses + and / characters, which have special meanings inside URLs and filenames. URL-safe Base64, defined in RFC 4648 section 5, swaps those for - and _ and conventionally drops the trailing equals padding. This tool produces that form directly, so you can paste the output into query strings, path segments, JWTs, or file names without worrying about extra escaping.

Use Cases

Build JWT segments

Header and payload parts of a JWT are URL-safe Base64. Encode claims by hand to test how a verifier behaves.

Embed tokens in URLs

Pack opaque identifiers into query strings where plain Base64 would require further percent encoding.

Name files on disk

Turn binary identifiers into filenames that work on every filesystem without reserved characters.

Send data over HTTP redirects

Shorter, safer than percent-encoding standard Base64, and reversible with no ambiguity.

FAQ

What is different from normal Base64?

Two character substitutions: plus becomes minus, slash becomes underscore. Padding is also typically omitted.

Do I need the padding?

Most URL-safe consumers reject or ignore padding, so it is stripped by default. Decoders reconstruct it from the string length.

Is this what JWT uses?

Yes. JWT compact serialization uses URL-safe Base64 without padding for all three dot-separated parts.

Is it still the same bytes?

Yes. The underlying bytes are identical to standard Base64. Only the alphabet and padding conventions differ.