Developer tools
Base64 Encoder & Decoder
Convert between text and Base64 in both directions, with full Unicode support and a URL-safe variant.
What is Base64 Encoder & Decoder?
Base64 represents binary data using 64 text-safe characters. It exists to solve a specific problem: many older protocols, email in particular, can only carry plain ASCII and will corrupt raw binary. You still meet Base64 everywhere today — images inlined into CSS, authentication tokens, configuration files.
One point deserves emphasis: Base64 is not encryption. It is simply a different representation of the same data, and anyone can reverse it in a second. Never use it to hide a password or anything else sensitive.
This implementation handles UTF-8 correctly, so Vietnamese diacritics and Chinese characters survive a full encode-decode round trip. Many other tools call btoa directly and break the moment they meet a character outside Latin-1.
How to use
- Choose Encode or Decode.
- Paste your content into the input. The result appears as you type.
- Enable URL-safe if the string will appear in a web address — it swaps + and / for - and _, and drops the trailing = padding.
- Click Swap to feed the result back through the opposite direction.
- Click Copy to take the result.
Frequently asked questions
Is Base64 a form of encryption?
Not at all. Base64 only changes how data is represented; there is no key and no secret. Anyone who sees the string can decode it instantly. If you need actual protection, use real encryption such as AES.
Why is Base64 always longer than the original?
Every 3 bytes of input become 4 characters of output, so the size grows by roughly 33%. That is the cost of squeezing binary data through channels that only accept text.
How does URL-safe differ from standard Base64?
Standard Base64 uses + and /, both of which have special meaning inside a URL and get misinterpreted. The URL-safe variant substitutes - and _, and usually drops the = padding. This is the form used inside JWTs.
What do the = signs at the end mean?
They are padding, added when the input length is not divisible by three. There can be one or two. This tool restores missing padding automatically when decoding, so a string with the = stripped still works.