Base64 Encode / Decode
Convert text to Base64 and back as you type. Full UTF-8 support for accents and emoji, plus a URL-safe variant.
How to encode and decode Base64
- Choose Encode or Decode.
- Type or paste your text. The result appears instantly in the Output box.
- Copy it or download it. Use Swap to feed the result back in and reverse the operation.
Features
UTF-8 safe
Accents, non-Latin scripts and emoji survive the round trip.
URL-safe option
Uses - and _ with no padding for use in URLs and JWTs.
Live
No button to press.
Private
Everything is generated in your browser; nothing is sent or stored.
Frequently asked questions
What is Base64 used for?
Base64 represents binary data using 64 printable characters so it can travel through text-only channels such as email, JSON and URLs. It is an encoding, not encryption: anyone can decode it.
Why is the output longer than the input?
Every 3 bytes become 4 characters, so Base64 is about 33% larger than the original data.
What is URL-safe Base64?
The standard alphabet uses + and /, which have special meaning in URLs. The URL-safe variant swaps them for - and _ and drops the = padding. JSON Web Tokens use this form.
Can I Base64-encode an image or file?
This tool handles text. To convert an image to a Base64 data URI, use our Image to Base64 tool.