Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to text, with full UTF-8 support — emojis, accented letters and non-English scripts all survive the round trip.
Result
How It Works
Base64 is a way of representing any data — text, images, files — using only 64 safe characters: the letters A–Z and a–z, the digits 0–9, plus + and /, with = as padding. It is used everywhere data has to travel through systems that only handle plain text: email attachments, data URLs in web pages, API tokens and basic authentication headers. Three bytes of input become four Base64 characters, so encoded output is roughly a third longer than the original.
Many online encoders fail on non-English text, because the browser’s built-in Base64 functions only understand Latin characters — a word like “café” or an emoji comes out garbled. This tool converts your text to UTF-8 bytes first and encodes those, so every language and every emoji survives the round trip exactly. Decoding works the same way in reverse, and invalid Base64 is reported with a clear error instead of a silent wrong answer.
Worked Example
Encode Hello, World! and you get SGVsbG8sIFdvcmxkIQ== — the two = signs at the end are padding, because 13 bytes of input do not divide evenly into groups of three. Encode café and you get Y2Fmw6k= — the é is stored as two UTF-8 bytes, both encoded correctly. Decode SGVsbG8sIFdvcmxkIQ== and you get Hello, World! back, exactly as it started.
How to Use This Tool
Type or paste your text into the box and press Encode to Base64, or paste a Base64 string and press Decode from Base64. The result appears below with the character counts for input and output; Copy Output copies it to your clipboard. If you try to decode something that is not valid Base64 — wrong characters, or a length that does not fit the format — the tool explains the problem instead of guessing.
Tips and Practical Advice
- Base64 is encoding, not encryption. Anyone can decode it, so never use it to hide a password, a secret or anything sensitive.
- Expect output about a third longer. A 900-byte file becomes roughly 1,200 characters of Base64, which matters when you paste data into a size-limited field.
- Whitespace is ignored when decoding. Line breaks copied from an email or a document are stripped automatically, so you can paste wrapped Base64 as it is.
Last updated: