How to encode and decode Base64
- Choose Encode to convert text or a file to Base64, or Decode to convert a Base64 string back to its original form.
- Paste your input or upload a file (encoding mode only).
- Click the action button. The result appears on the right.
- Copy the output or use Download to save the decoded file.
What is Base64?
Base64 is an encoding scheme that converts binary data, or any text, into a string made up of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /, and = for padding). The name comes from the 64 characters in the alphabet.
Because Base64 produces only printable characters, it is safe to embed in any text-based format: HTML, CSS, JSON, XML, email headers, and URLs (with the URL-safe variant that replaces + with - and / with _).
Common uses of Base64
- Inline images in CSS / HTML: embed small images as
data:image/png;base64,...URIs to eliminate an HTTP request - Email attachments: MIME encodes binary attachments in Base64 so they survive email transport, which was originally text-only
- API tokens and credentials: HTTP Basic Auth encodes
username:passwordin Base64 before sending the Authorization header - Certificates and keys: PEM files (TLS certs, SSH keys) wrap DER binary data in Base64 between
-----BEGIN-----markers - JSON payloads: embed binary files (PDFs, images) in JSON APIs without a separate upload endpoint
Base64 is not encryption
Base64 is an encoding, not a cipher. Any Base64 string can be decoded instantly without a key. It provides zero confidentiality. Never use Base64 to "hide" sensitive data, use proper encryption (AES, RSA) or hashing (bcrypt, Argon2) instead.
Size increase
Base64 increases data size by approximately 33% (3 bytes become 4 characters). For large binary files, this overhead matters. For small assets like icons, the tradeoff is often worth it to save an HTTP round trip.
Privacy
All encoding and decoding runs entirely in your browser. No data is uploaded or sent to any server.