Base64 encoding converts binary or text data into a string of ASCII characters, making it safe to transmit over systems that only handle text — like email, JSON APIs, and HTML data attributes. Our free online Base64 encoder and decoder handles the conversion instantly in your browser. Paste your plain text to encode it, or paste a Base64 string to decode it back to readable text. Common use cases include encoding images for embedding in CSS or HTML, passing binary data in REST API payloads, and storing complex strings in cookies or local storage. The tool supports full UTF-8 input, so accented characters and emoji encode and decode correctly.
How to Encode or Decode Base64
- Paste your text or Base64 string into the top input area.
- Click Encode → to convert plain text to Base64, or ← Decode to reverse it.
- The result appears in the output area below.
- Use ↕ Swap to move the output back to the input for chaining operations.
- Click Copy Result to copy the output to your clipboard.
Common Base64 Use Cases
- Embed images in HTML/CSS — convert an image to Base64 and use it as a
data:URI to avoid an extra HTTP request. - API authentication — HTTP Basic Auth headers send credentials as
Base64(username:password). - JWT tokens — the header and payload sections of JSON Web Tokens are Base64-encoded.
- Email attachments — MIME email protocol uses Base64 to encode binary attachments.
Frequently Asked Questions
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. Anyone with the encoded string can decode it instantly. Do not use Base64 to secure sensitive data — use proper encryption (AES-256, etc.) for that.
Why does my encoded string end with == ?
Base64 uses padding characters (=) to make the output length a multiple of 4. One = means the original data had 2 bytes in the last group; == means it had 1 byte. Both are normal.
