Base64 Encoder & Decoder
Encode text to Base64 or decode it back, UTF-8 safe, with a URL-safe option.
Text
Base64
The Base64 appears here as you type.
Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
Base64 turns any text into a string made of 64 safe characters, so it can travel through systems that only accept plain ASCII — email bodies, URLs, JSON fields and HTTP headers. This tool encodes text to Base64 and decodes Base64 back to readable text, handling every language through UTF-8.
How to use it
- Choose Encode or Decode.
- Type or paste into the input. The result updates as you type.
- Turn on URL-safe to use - and _ instead of + and /, and drop the = padding.
- Press the swap button to move the result back into the input and reverse the direction.
- Copy the result.
Limits and your data
- Base64 is an encoding, not encryption. Anyone can decode it; never use it to hide a secret.
- Decoding only shows text. If the data is an image or a file, the tool says so instead of printing unreadable characters.
- Input is limited to 10 MB of text.
- Encoding and decoding happen in your browser. Nothing you paste is uploaded or stored. Base64 is often used to carry credentials in headers — treat decoded output with the same care as the original.
Questions
Why is the encoded text longer than the original?
Base64 uses four characters for every three bytes, so output is about a third larger. Text in Hindi or emoji grows more, because each character takes several UTF-8 bytes before encoding.
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant swaps them for - and _ and usually leaves off the trailing = padding. JWTs use it.
Why does decoding say my data is binary?
The bytes do not form valid UTF-8 text, which usually means the Base64 holds an image, a PDF or compressed data rather than a string.
Is Base64 secure?
No. It hides nothing — it is only a way to represent bytes as text. Use encryption if the content needs protecting.