Developer Tools

Free Base64 Encoder & Decoder

Encode any text or binary data to Base64, or decode Base64 strings back to plain text. Supports standard Base64, URL-safe Base64 (for JWT and OAuth), Unicode text, and padding control.

  • Local processing
  • Free, no sign-up
  • URL-safe Base64
  • Unicode support
Input

Text to encode

Type or paste plain text. Unicode is handled safely.

148 input bytes200 output bytes
Output

Standard Base64

Processing happens locally in your browser.

Alphabet: StandardEncode text or decode Base64 locally in your browser.

What this covers

Standard Base64 for regular payloads, plus URL-safe Base64 for query strings, paths, and token-like data.

Input behavior

Decoder accepts both standard and URL-safe alphabets, with or without trailing padding.

Why it matters

It keeps the common encode/decode loop in one place and removes the annoying padding and alphabet edge cases.

Frequently asked questions

How do I encode text to Base64?

Type or paste your text into the input field and select 'Encode'. The tool instantly converts it to Base64 using the browser's built-in btoa() function, with proper Unicode handling for non-ASCII characters.

How do I decode a Base64 string?

Paste the Base64 string into the input field and select 'Decode'. The tool uses atob() to convert it back to the original text. If the Base64 is URL-safe (uses - and _ instead of + and /), select the URL-safe option first.

Where is Base64 used in web development?

Base64 is used in: JWT tokens (the header and payload are Base64-encoded), embedding images in CSS/HTML as data URIs, Basic Auth headers (username:password encoded as Base64), email attachments (MIME), and storing binary data in JSON APIs.

What does 'invalid Base64' mean?

Base64 strings must use only the characters A-Z, a-z, 0-9, +, / (or - and _ for URL-safe). The length must be a multiple of 4. An invalid Base64 error means the string has illegal characters or incorrect padding (= symbols).