How to encode or decode Base64
No buttons needed — this encoder works live.
- Type or paste text into the Plain text box and the Base64 form appears instantly in the box beside it.
- Paste an existing Base64 string into the Base64 box and the decoded text appears on the left.
- Use the Copy button on either side to grab the result.
Features
- Two-way and live — both directions update as you type, so there is never a "convert" button to remember.
- Real UTF-8 support — unlike naive tools, Chinese (
你好), Japanese, accented letters and emoji are encoded byte-for-byte correctly and decode back unchanged. - Lenient decoding — whitespace is ignored and URL-safe Base64 (
-/_) and missing padding are handled automatically. - 100% private — encoding happens locally with the browser's own APIs. Nothing is uploaded.
What is Base64?
Base64 is a way of representing binary data using only 64 safe ASCII characters (A–Z, a–z, 0–9, +, / and padding =). It is used everywhere that data must travel through text-only channels: embedding images in HTML or CSS as data URIs, attaching files to email, and encoding the three parts of a JWT. Because it inflates data by about 33%, it is an encoding for transport — not compression.
Frequently asked questions
Is Base64 encryption?
No. Base64 is just an encoding — anyone who sees a Base64 string can decode it instantly. Never use Base64 to protect secrets or passwords; use proper encryption (or better, a hashing scheme) instead.
Why do some strings end with "=" or "=="?
The padding character = is added so the encoded length is a multiple of 4. Some formats omit it, which is fine — this decoder adds it back automatically if missing.
Why is my decoded Chinese text garbled?
That usually means the text was decoded without UTF-8. This tool encodes and decodes using UTF-8 correctly, but if the Base64 was produced by a tool that used the browser default encoding, the bytes may not match. Paste the original text through encode here to get a clean UTF-8 Base64 string to compare.
Can I encode binary files, like images?
This page works on text. To turn an image into a Base64 data URI, use the image-to-data-URI feature of your browser dev tools or a small script — then paste the resulting Base64 into the Base64 box to view the encoded data.
Is my data sent to a server?
No. Encoding and decoding use the browser's built-in TextEncoder, TextDecoder, btoa and atob — all local, all offline-capable.