Base64 Encoder & Decoder

Convert any text to or from Base64 — a popular encoding format used to safely transmit binary or special-character data over text-based protocols like JSON, HTTP and email. The tool handles full Unicode (including emoji), so encoded strings decode back to the exact original text. Everything runs in your browser, so it's safe even for tokens and other sensitive payloads.

What Is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents data using only 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It converts every 3 bytes of input into 4 characters of output, increasing size by about 33%. The trade-off is that the result can be safely included in any text-based format — JSON, HTML, XML, email — without breaking the surrounding structure.

Common Uses for Base64

  • Embedding images in HTML/CSS: src="data:image/png;base64,..." removes an HTTP request.
  • HTTP Basic Authentication: credentials are sent as Base64(username:password) in the Authorization header.
  • JSON Web Tokens (JWT): the header and payload sections are Base64Url encoded.
  • Email attachments (MIME): binary file attachments are Base64 encoded to survive email transmission.
  • API payloads: sending binary data (certificates, keys, images) through REST APIs that expect JSON strings.

Base64 Is NOT Encryption

Base64 encodes data — it does not encrypt or hide it. Anyone who sees the encoded string can decode it in seconds. Never use Base64 to protect passwords, tokens or confidential information. For security, use proper encryption (AES, RSA) or hashing (bcrypt, Argon2).

Base64 vs Base64Url

Standard Base64 uses + and /, which are special characters in URLs. Base64Url replaces them with - and _, making it safe for URL parameters and filenames. JWTs use Base64Url. Our encoder outputs standard Base64; if you need Base64Url, replace + with - and / with _ in the result.

Frequently Asked Questions

What is Base64?

Base64 encodes binary or text data using only 64 printable ASCII characters. It's used to embed images in HTML/CSS, transmit data in JSON, and store credentials in HTTP headers.

Does this tool support Unicode and emoji?

Yes — characters are UTF-8 encoded before Base64 conversion, so emojis and non-Latin scripts round-trip cleanly.

Is Base64 the same as encryption?

No. Base64 is encoding, not encryption. Anyone with the string can decode it instantly. Never use it to protect sensitive information.

Can I encode image files?

Use our Image to Base64 tool for image files — it produces ready-to-use HTML and CSS snippets. This page is optimized for plain text.