Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 back to plain text, with URL-safe support.
About the Base64 Encoder/Decoder
Base64 is a scheme for representing arbitrary binary data as plain ASCII text, using a 64-character alphabet (A-Z, a-z, 0-9, and two symbols). It works by reading input three bytes (24 bits) at a time and splitting those 24 bits into four 6-bit chunks, each of which maps to one alphabet character — that's why encoded output is always about a third longer than the original text. It exists because many older protocols (email, some URL query strings, JSON when you don't want raw bytes) only reliably carry printable ASCII, so binary-ish content gets wrapped in Base64 to pass through safely and is unwrapped on the other end.
This tool encodes and decodes entirely with the browser's built-in UTF-8-aware routines, so accented letters and emoji round-trip correctly rather than getting mangled — a common bug with naive Base64 implementations that only handle single-byte characters.
To use it: switch to Encode or Decode with the toggle buttons, paste your text or Base64 string into the left box, and the right box updates as you type. Turn on URL-safe if the result needs to live inside a URL — it swaps the standard alphabet's + and / for - and _ and strips trailing = padding, since those characters otherwise need percent-escaping in a URL. For example, encoding the text Hi! produces SGkh in standard Base64: the bytes H (72), i (33), ! (33) become the bit stream 01001000 01101001 00100001, regrouped into four 6-bit values 010010 000110 100100 100001 — 18, 6, 36, 33 — which map to S, G, k, h in the Base64 alphabet.