What is Base64?

Base64 is an encoding scheme that converts binary data into a string of 64 ASCII characters (A–Z, a–z, 0–9, +, /). It is used whenever binary data must travel through a text-only channel — email attachments, data: URIs, JWTs, and HTTP Basic Auth headers all rely on Base64 encoding.

How to Use

  1. Paste your text into the input box.
  2. Click Encode to convert plain text to Base64, or Decode to reverse it.
  3. The result appears immediately. Click Copy Output to copy it.

Common Use Cases

  • JWT payloads — JWT header and payload sections are Base64URL-encoded JSON. Decode them to inspect claims.
  • HTTP Basic Auth — Credentials are sent as Authorization: Basic <base64(user:pass)>. Decode to verify what is being sent.
  • Kubernetes secrets — Secret values in kubectl get secret -o yaml output are Base64-encoded.
  • Inline images — Embed images in HTML/CSS as data:image/png;base64,... to avoid extra HTTP requests.

FAQs

Is Base64 the same as encryption?

No. Base64 is encoding, not encryption — it is trivially reversible by anyone. Never use it to protect sensitive data; use proper encryption (AES, RSA) instead.

What is the difference between Base64 and Base64URL?

Base64URL replaces + with - and / with _, and omits padding (=) so the result is safe in URLs and HTTP headers. JWTs use Base64URL.

How much larger is Base64 output than the original?

Base64 encodes every 3 bytes as 4 characters, so encoded output is approximately 33% larger than the original input.