How Base64 Encoder / Decoder Works
Base64 represents any sequence of bytes using only 64 printable ASCII characters (A–Z, a–z, 0–9, + and /), which makes it safe to embed binary data — like an image or file — inside text formats such as JSON, HTML or email. Encoding groups the input into 3-byte chunks and maps each to 4 Base64 characters; decoding reverses that mapping.
How to Use This Tool
- Choose Encode or Decode.
- Type or paste text, or (in Encode mode) choose a file to convert instead.
- Select Convert.
- Copy the result from the output box.
Example
Encoding the text ToolWorld produces VG9vbFdvcmxk. Decoding VG9vbFdvcmxk produces ToolWorld again.
Helpful Tips
- Base64-encoded text is roughly 33% larger than the original data — it trades size for being safely embeddable in text.
- When encoding a file, the output is the raw Base64 string without a
data:prefix — add one yourself if you need a data URL for an image.
Frequently Asked Questions
Is Base64 encoding a form of encryption?
No. Base64 is an encoding, not encryption — anyone can decode it instantly. Don't use it to protect sensitive data.
Can I encode a file, not just text?
Yes, in Encode mode you can choose a file instead of typing text, and it will be converted to a Base64 string.
Why does decoding sometimes fail?
The input needs to be valid Base64 — if it contains characters outside A-Z, a-z, 0-9, +, / and = padding, or has an invalid length, decoding will show an error.
Is my file or text uploaded anywhere?
No, encoding and decoding both happen entirely in your browser.
This tool runs entirely in your browser. Your input is not uploaded to any server.