Base64 Encoder & Decoder

Encode/decode Base64 in your browser. Text and file modes, standard and URL-safe variants. UTF-8 aware.

published

  • [FREE]
  • [NO_SIGNUP]
  • [NO_UPLOAD]

A Base64 encoder and decoder converts arbitrary bytes to/from the Base64 ASCII representation. This tool handles text (live, debounced), files (any size your browser can hold), standard and URL-safe variants, and UTF-8 correctly.

Standard vs URL-safe

VariantChars usedPaddingUsed by
StandardA-Z a-z 0-9 + /= for fillHTTP headers, X.509 certs, generic data
URL-safeA-Z a-z 0-9 - _droppedJWT signatures, OAuth tokens, base64url in JSON

Decode side tolerates both. The toggle controls encoder output.

How big is the encoded output?

Base64 expands every 3 input bytes into 4 output chars. So:

  • 100 KB → ~133 KB
  • 1 MB → ~1.33 MB
  • 1 GB → ~1.33 GB (don’t paste this anywhere — use a CLI)

URL-safe is identical size with padding dropped (saves 1-2 chars on the tail).

Privacy

A static HTML page with a small JS bundle. Everything runs in your browser tab. No upload.

  • JWT Decoder — JWT signatures are URL-safe Base64 over the SHA-256 HMAC.
  • Hash Generator — hex / Base64 / URL-safe Base64 output for SHA family.

Frequently asked questions

Is my input sent to a server?

No. Encoding and decoding both run via browser-native window.btoa / atob plus a small UTF-8 wrapper. File reads use FileReader. Open DevTools → Network and you will see zero requests.

What is URL-safe Base64?

A variant of Base64 that swaps + for - and / for _ (URL-reserved characters) and drops the trailing = padding. Used in JWTs, OAuth tokens, and anywhere Base64 ends up in a URL path or query string. Decode side accepts both variants — the toggle just controls the encoder output.

Why does my decoded text look like garbage?

Either the input is not Base64, or it was encoded as a different character set. The decoder treats output as UTF-8; if the source was Latin-1 or another encoding, characters above 0x7F will render incorrectly.

How big a file can I encode?

Limited by browser memory. Hundreds of MB work on a modern desktop; phones may struggle past 50-100 MB. The encoder loads the whole file before output. For multi-GB streams use the OpenSSL CLI: `base64 < file > out.b64`.

Decoded a file but it's nonsense — what happened?

The decoder treats your input as Base64-encoded bytes. If you pasted plain text or hex, the output will look random. Check that the input is real Base64 (only A-Z, a-z, 0-9, +, /, =, plus possibly - and _ for URL-safe).

Can I share a Base64 calculation?

Yes, in text mode only — file mode cannot share because files do not fit in URLs. The share link encodes direction + variant + input via the URL fragment.

Is the Base64 tool really free?

Yes. No signup, no account, no ads, no telemetry on your input.