Base64 — encode and decode
This tool encodes text into Base64 and decodes it back into readable text. Base64 is used to carry text and binary data safely through channels that only handle ASCII characters – such as e-mail, JSON, HTTP headers or data URIs. The tool fully supports accented letters and emoji (UTF-8) and runs entirely in your browser, so the text you paste is never sent anywhere.
How Base64 works
Base64 is a way to represent arbitrary data using just 64 „safe" characters: the upper- and lower-case letters A–Z and a–z, the digits 0–9, and the symbols + and /. Encoding takes the input in groups of three bytes (3 × 8 = 24 bits) and splits them into four six-bit groups; each six-bit value (0–63) is replaced by one character from the alphabet. When the input length is not a multiple of three, the output is padded with = characters at the end.
As a result, Base64 output is always longer than the input, by roughly a third (4 characters for every 3 bytes). Base64 is not encryption and not compression – it is merely a reversible re-encoding that anyone can instantly decode back. It does not hide your data, it only lets it travel safely.
Because a single accented „character" or emoji occupies more than one byte in UTF-8, this tool first converts the text to UTF-8 before encoding. Input like Příliš therefore produces valid Base64 that decodes back to exactly the same string, diacritics and all.
How to use Base64
- Paste the text you want to convert into the top field.
- Click Encode → to turn text into Base64, or ← Decode if you pasted a Base64 string and want the original text back.
- The result appears in the bottom field, ready to copy.
- When decoding, surrounding whitespace is ignored; if the input is not valid Base64, the tool tells you.
Example conversion:
| Input | Direction | Output |
|---|---|---|
Hello | encode | SGVsbG8= |
SGVsbG8= | decode | Hello |
Příliš | encode | UMWZw61sacWh |
What Base64 is good for
Base64 is mostly used by developers and people working with data. Typical scenarios:
- Data URIs – embedding a small image, font or file directly in HTML or CSS as
data:...;base64,..., without a separate file. - APIs and JSON – carrying binary content (attachments, keys, signatures) inside a text field that cannot hold raw binary.
- E-mail – encoding attachments according to the MIME standard.
- Debugging and HTTP headers – reading tokens, cookies or values that are Base64-encoded.
Because the whole conversion happens locally in your browser and nothing is sent to a server, you can safely use the tool even on sensitive text. Keep in mind, though, that Base64 itself does not protect data – anyone holding the string can trivially decode it back.
FAQ
Is Base64 encryption?
No. Base64 is just a reversible re-encoding into a safe character set. It contains no key or secret and anyone can decode the string instantly. Use real encryption to keep data confidential.
Does it work with accents and non-English characters?
Yes. The tool converts text to UTF-8 before encoding, so accents, diacritics and emoji pass through correctly and decode back to exactly the same characters.
Why is Base64 output longer than the input?
Base64 encodes every 3 bytes into 4 characters, so output is about a third longer. That is the cost of fitting binary data into a safe text alphabet.
What do the = characters at the end mean?
They are padding. They pad the output to a multiple of four characters when the input length is not divisible by three. They are a valid part of standard Base64.
Is my text sent to a server?
No. The whole conversion runs using browser functions directly on your device. The text you paste never leaves your browser.
Decoding shows an error – why?
The input is probably not valid Base64: it contains disallowed characters, has the wrong length, or misplaced padding. Check that you copied the entire string.
Does the tool support the Base64URL variant?
The tool works with standard Base64 (using + and /). The Base64URL variant replaces + and / with - and _ for use in URLs; for that a URL encoder is more suitable.
Can I encode an image or file this way?
This tool works with text. Base64 is commonly used for files too (e.g. in data URIs), but that needs a tool that reads the binary file directly.
Sources & standards
📅 Last updated: 11 July 2026