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· Your data stays in your browser.
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?
- Type or paste the text to encode; the Base64URL string is produced as you type.
- Tick "Add = padding" only if the receiving system insists on a length that is a multiple of 4.
- 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:
Hello, Base64URL! >>>???
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.
Related tools
Base64URL Decoder
Paste a URL-safe Base64 string, such as a JWT segment, and read the text inside immediately.
Encoding & Decoding
Base64 Encoder
Convert any text, including emoji and accented characters, into a Base64 string in one click.
Encoding & Decoding
JWT Decoder
Paste a JWT to read its header and payload as formatted JSON, with issue, not-before and expiry times translated to real dates. Decoding is not verification.
Developer Tools
URL Encoder
Make any text safe for a URL: spaces, accents, ampersands and emoji become %XX sequences.
Encoding & Decoding
Base32 Encoder
Convert text into a Base32 string, the case-insensitive encoding used for authenticator secrets and file-safe identifiers.
Encoding & Decoding
Text to Hex Converter
See the exact bytes behind any text, from a quick "Hello" to emoji, formatted the way your code or debugger expects.
Encoding & Decoding