Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 strings back to plain text.

Free Runs in your browser

How to use

  1. 1 Select the direction: Encode (text → Base64) or Decode (Base64 → text).
  2. 2 Paste or type your input into the text area.
  3. 3 The result appears instantly in the output field.
  4. 4 Click Copy to use the encoded or decoded value in your code or configuration.

Key features

  • Encode any text to Base64 or decode Base64 back to plain text
  • Handles multi-line input and Unicode characters
  • Instant output — no button press needed
  • Useful for API tokens, image embedding, and data transport

What is Base64?

Base64 is an encoding scheme that converts binary data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It was designed to safely transmit binary content — like images or binary files — through systems that only handle text, such as email (MIME) or JSON payloads.

Every 3 bytes of input become 4 Base64 characters, which means encoded output is always about 33% larger than the original. Base64 is an encoding, not an encryption — it provides no security whatsoever. Anyone can decode a Base64 string with no key.

Common Use Cases

HTTP Basic Auth headers

Browsers encode "username:password" as Base64 and send it in the Authorization header.

Inline images in CSS and HTML

Embed small images as Base64 data URIs to eliminate extra HTTP requests.

Email attachments (MIME)

Email protocols transport attachments as Base64 to keep binary data intact across text-based channels.

Passing binary in JSON APIs

APIs that can only carry JSON use Base64 to transfer binary blobs like images or PDFs.

Decoding API tokens

Decode the payload portion of a JWT or API response that stores Base64-encoded metadata.

Config and environment values

Encode multiline strings or binary certificates as a single Base64 value in environment variables.

Base64 vs Base64url

Standard Base64 uses + and /, which are unsafe in URLs. Base64url (used in JWTs and OAuth tokens) replaces them with - and _ and typically omits the trailing = padding.

VariantCharacters +/Typical use
Standard Base64+ /MIME email, data URIs, Basic Auth headers
Base64url- _JWTs, OAuth 2.0 PKCE, URL-safe tokens