
Base64 is a way of writing binary data, or any text, using only 64 safe characters: letters, digits, + and /, with = as padding at the end. It exists because many systems that carry data, such as email, JSON and URLs, were built for plain text and can break on arbitrary bytes. The tool below encodes text to Base64 and decodes Base64 back to text. It runs in your browser, so what you paste is not sent anywhere.
Base64 encoder and decoder
Convert text to Base64 and back. Turkish letters and emoji work: the text is read as UTF-8.
What you enter never leaves your browser. Nothing is sent or stored.
How to use the tool
- Type or paste your text, or the Base64 string, into the input field.
- Press Encode to convert text to Base64, or Decode to convert Base64 back to text.
- Copy the result.
If you try to decode something that is not valid Base64, the tool reports an error instead of showing broken output. A common cause is a stray space, a missing character at the end or a string that uses the URL-safe variant described below.
Where you meet Base64
- Small images embedded straight into HTML or CSS as
data:addresses. - Email attachments, which are carried as Base64 inside the message.
- The header and payload of a JWT, which use the URL-safe variant.
- HTTP Basic authentication, where
username:passwordis sent as Base64. - Binary values inside JSON or XML, where raw bytes cannot go.
Base64 is not encryption
This is the most important thing to know. Base64 hides nothing. Anyone can decode it in a second, with this tool or with one line of code. If a password, an API key or personal data is "protected" by Base64, it is not protected at all. Use real encryption for secrets, and keep secrets out of places where only Base64 stands between them and the reader.
Base64 also makes data bigger. Every three bytes become four characters, so the encoded text is about a third larger than the original.
Things to watch for
- Non-English characters and emoji. Text has to be turned into bytes before it is encoded, and the usual choice is UTF-8. If one system encodes with UTF-8 and another decodes as something else, accented letters come out wrong. Make sure both sides agree.
- The URL-safe variant. It replaces
+with-and/with_and often drops the=padding. A string in that form needs converting back before a standard decoder reads it. - Line breaks. Some systems wrap Base64 at a fixed width. Remove the line breaks if a decoder rejects the string.
- Large files. Base64 inside a page or a JSON field is fine for small items. For big files it wastes bandwidth and memory, and a normal file upload is the better choice.
When data formats cause integration bugs
Mismatched encodings are a classic source of failures between systems: a field that arrives unreadable, an attachment that is corrupted, a character that turns into a question mark. If your systems exchange data in several formats and someone fixes it by hand each time, system integration is the work that removes that step, and custom software development covers the product side.
Frequently asked questions
Does my text leave my browser?
No. Encoding and decoding happen in the page on your device. The tool makes no network request with your text and does not store it.
Is Base64 secure?
No. It is an encoding, not encryption. Anyone can reverse it without a key.
Why does the encoded text end with `=`?
Base64 works in groups of three bytes. When the data does not fill the last group, one or two = characters pad it out.
Can I encode a file or an image?
The tool works on text. Files are usually encoded in code, for example when building a data: address or an API request, using the language's own Base64 function.
Why does the decoded text look wrong?
Most often the text was encoded with a different character set than the one used to read it, or the string was damaged on the way, for instance by a copied line break or a missing character.
Related services
Where this topic becomes an engagement.
Keep reading
The articles that follow this one.



