How to encode or decode Base64
- Choose Encode or Decode and type or paste your text — with Live mode on, the result updates as you type.
- Turn on URL-safe to use - and _ instead of + and / and drop padding.
- For files, drop a file to get its Base64, or paste Base64 and click Download file to rebuild the original.
What is Base64 Encode/Decode?
Base64 is an encoding that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /), with = as padding. Every 3 bytes become 4 characters, so Base64 output is about 33% larger than the input. It is used in data URIs, email attachments (MIME), JSON payloads, JWTs and HTTP Basic auth.
This tool encodes text as UTF-8 bytes with TextEncoder before converting, so emoji and non-Latin characters round-trip correctly, unlike the browser's raw btoa(). URL-safe mode follows RFC 4648 section 5: + becomes -, / becomes _ and padding is removed. The decoder accepts both alphabets, ignores whitespace and fixes missing padding.
Files are read locally with the FileReader API and are never uploaded. Base64 is an encoding, not encryption — anyone can decode it.
Frequently asked questions
Is Base64 encryption?
No. Base64 is a reversible encoding, not encryption. Anyone can decode Base64 text, so never use it to protect passwords or secrets.
Why does Base64 make data bigger?
Base64 turns every 3 bytes into 4 ASCII characters, so encoded output is about 33% larger than the original, plus up to two = padding characters.
What is URL-safe Base64?
URL-safe Base64 (RFC 4648 section 5) replaces + with - and / with _ and usually drops = padding, so the result can be used in URLs and filenames without escaping.
Does it support emoji and non-English text?
Yes. Text is converted to UTF-8 bytes with TextEncoder before encoding and decoded with TextDecoder, so emoji, accents and all scripts round-trip correctly.
How do I convert Base64 back to a file?
Paste the Base64 string or data URI into the Base64 to file box and click Download file. The file type is detected from the data URI or the file's signature bytes.
Are my files uploaded?
No. Encoding and decoding run entirely in your browser, so your text and files never leave your device and the tool works offline.