Base64 Encoder / Decoder
Base64 isn't encryption. It's a reversible encoding scheme for representing binary data as plain text, commonly used for embedding images in CSS/HTML, encoding email attachments, or passing binary data through systems that only handle text. This tool encodes and decodes both directions, with full Unicode support so non-ASCII text round-trips correctly.
How to use the Base64 Encoder / Decoder
- Choose whether you want to encode or decode.
- Paste or type your text into the input area.
- The converted result appears instantly in the output area.
- Click the copy button to copy the result to your clipboard.
Why Base64 output is always about 33% larger
Base64 represents every 3 bytes of original data as 4 characters, which is why encoded output is reliably about 33% larger than the source. This is a real cost worth remembering before embedding, say, a Base64-encoded image directly in CSS: a 30KB image becomes roughly 40KB as a Base64 string, and unlike a linked image file, it can't be cached separately by the browser since it's baked into the CSS or HTML itself.
Frequently asked questions
Is Base64 encoding a form of security or encryption?
No. It's simply a text representation of binary data, fully and trivially reversible by anyone. Never use Base64 alone to protect sensitive data; it provides no confidentiality at all.
Why does decoding sometimes produce garbled text?
Usually a character encoding mismatch. If the original text included non-ASCII characters (accented letters, emoji, non-Latin scripts), make sure UTF-8 handling is used consistently on both the encoding and decoding side.
Can I encode and decode files, not just text?
This tool is built for text input; encoding actual files (images, PDFs) into Base64 typically requires reading the file's binary data first, which a dedicated file-to-Base64 tool (see the Image to Base64 tool) handles more directly.
Related Guides
Related Tools
Image to Base64
Convert images to Base64 data URIs or decode Base64 strings back to images.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from text or files instantly.
JWT Decoder
Decode and inspect JSON Web Tokens — view header, payload, and expiration without a server.
JSON Formatter
Prettify, minify, and validate JSON with syntax highlighting.