Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 to plain text — instantly in your browser.

Instant result Runs in browser

About Base64

A–Z  → 0–25
a–z  → 26–51
0–9  → 52–61
+    → 62
/    → 63
=    → padding

Base64 encodes 3 bytes into 4 ASCII characters, producing output ~33% larger than the input. Used in JWT, HTTP auth, data URIs, and MIME email attachments.

How to use?

  1. 1
    Enter your textType or paste the text you want to encode into Base64, or paste a Base64 string you want to decode.
  2. 2
    Click Encode or DecodePress Encode to convert plain text to Base64, or Decode to recover the original text from a Base64 string.
  3. 3
    Copy the resultUse the copy button or Swap to move the output back to input for chained operations.

FAQ

What is Base64 used for?
Base64 is used wherever binary data must travel through text-only channels: JWT tokens, HTTP Basic Authentication, email MIME attachments, inline data URIs in HTML/CSS, API payloads, and secrets in CI/CD environments.
Is Base64 the same as encryption?
No. Base64 is an encoding scheme, not encryption. It provides zero security — anyone can decode it instantly. Never use Base64 to hide passwords or sensitive data. Use proper encryption (AES-256, RSA) for real confidentiality.
Why does Base64 output end with = signs?
Base64 encodes data in 3-byte groups. When input length is not a multiple of 3, one or two = padding characters are added so output length is always a multiple of 4.

JWT — JSON Web Tokens

JWT headers and payloads are Base64url-encoded. A JWT consists of three dot-separated parts: header.payload.signature. Decoding the first two reveals the algorithm and claims as plain JSON. This is fundamental to OAuth 2.0, OpenID Connect, and modern REST API authentication. Critical note: JWT payloads are only encoded, not encrypted — anyone with the token can read the payload.

HTTP Basic Authentication

The HTTP Basic Auth scheme encodes username:password as Base64 in the Authorization header. This must always be used over HTTPS since Base64 is trivially reversible.

Data URIs and Inline Assets

Embedding small binary files in HTML eliminates HTTP requests: <img src="data:image/png;base64,...">. Best reserved for assets under 10 KB since Base64 inflates file size by ~33%.

Email MIME Attachments

SMTP was designed for 7-bit ASCII text. Base64 allows binary files — images, PDFs, ZIP archives — to pass through email infrastructure unchanged via Content-Transfer-Encoding: base64.

API Payloads and Secrets

REST APIs embed binary content (TLS certificates, SSH keys) as Base64 strings within JSON. Kubernetes, Docker, and CI/CD platforms store Base64-encoded secrets in YAML and environment variables to handle special characters safely.

Base64 Is Not Encryption

Base64 provides zero confidentiality. Anyone can decode it in milliseconds. Never use Base64 to hide passwords, API keys, or personal data. For real security use AES-256-GCM or ChaCha20-Poly1305. For passwords, use bcrypt, scrypt, or Argon2.

Privacy

All operations run entirely in your browser. No input is ever sent to any server.

Comments