Base64 Encoder and Decoder
Convert text to Base64 and back. Handles any language correctly, including Chinese and emoji, and supports the URL-safe variant used in JWTs and query strings.
Uses - and _ instead of + and /, and drops the = padding.
All processing happens in your browser. Files are never uploaded to a server.
At a glance
- Processing
- In your browser - nothing is uploaded
- Price
- Free, no account
How to use
Choose Encode or Decode.
Paste your text or Base64 string into the input box.
Turn on "URL-safe variant" if the string uses - and _ instead of + and /.
Copy the result.
Frequently asked questions
Does this handle non-English text?
Yes. Text is converted to UTF-8 before encoding, so Chinese, Japanese, Arabic, accented characters and emoji all round-trip correctly. Many simple Base64 tools break on these because they use the browser btoa function directly, which only accepts Latin-1.
What is the URL-safe variant?
Standard Base64 uses + and /, which have special meaning in URLs, and = for padding. The URL-safe variant replaces them with - and _ and drops the padding. It is what JWTs and most URL parameters use.
Is Base64 encryption?
No, and this matters. Base64 is an encoding, not encryption - anyone can decode it instantly. Never use it to protect passwords, tokens or personal data. Its purpose is to carry binary data safely through text-only channels.
Why does my Base64 fail to decode?
Usually one of three reasons: the string was truncated when copied, it is the URL-safe variant but the option is off (or the reverse), or it encodes binary data rather than text - this tool decodes to text, so raw binary will be rejected.
Why is the encoded string longer than the original?
Base64 represents every 3 bytes as 4 characters, so output is about 33% larger. That overhead is the price of making binary data safe to transmit as text.
Is my data sent to a server?
No. Everything is computed in your browser. This matters because Base64 strings often contain tokens and credentials.