Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to text. You can also encode a file to a Base64 data URI. Everything runs in your browser – no data is sent to any server.
What Is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data as a string of printable ASCII characters. It's commonly used to embed images in HTML/CSS, transmit binary data in JSON or XML, or encode email attachments.
The encoding increases data size by about 33%, so it's not a compression method – it's a transport encoding.
FAQ
Is Base64 encryption?
No. Base64 is an encoding, not encryption. It provides no security – anyone can decode a Base64 string. Use it for data transport, not for hiding sensitive information.
What's a Base64 data URI?
When you encode a file, the output includes the MIME type header (e.g., data:image/png;base64,...). This format can be used directly in HTML src attributes or CSS url() values.
Why does the output look garbled when decoding?
If the input isn't valid Base64, the decoder will produce unexpected results. Make sure you're decoding a proper Base64 string. Binary content decoded from Base64 may not display as readable text.