About the Base64 Encoder / Decoder
The Base64 Encoder / Decoder runs entirely in your browser — your code and data never leave your machine. Paste, click, copy the result.
Base64 converts binary-safe data into 64 printable characters — the standard for embedding images in CSS, sending attachments in JSON, or storing binary blobs in text-only systems. This tool encodes and decodes with full Unicode support, so emoji, Arabic and emoji survive the round trip intact.
How to use this tool
- Paste plain text (or paste Base64 and click Swap direction).
- Press Encode → or use the swap button to decode.
- Copy the output. Input is never uploaded.
How it works
Every 3 bytes of input become 4 Base64 characters. The alphabet is A–Z a–z 0–9 + / with = padding at the end. Because it uses only text characters, Base64 data can travel anywhere plain text can — emails, URLs, JSON — at the cost of ~33% size increase.
When you need it
- Data URIs:
data:image/png;base64,iVBOR… - JWT tokens: header and payload are Base64URL
- HTTP Basic auth:
Authorization: Basic base64(user:pass) - Embedding binary in JSON or config files
Not encryption: Base64 is encoding, not security. Anyone can reverse it in one line of code — never use it to "hide" passwords or keys.
Who is this tool for?
Front-end developers inlining assets, backend engineers serializing binary data, and anyone who has met data:image/… in the wild.
Developer tip
Base64URL (used in JWTs and URLs) replaces + with - and / with _ and strips =. If a URL-encoded token fails to decode, replace those characters first.