API & Auth
Convert text to Base64 and back — Unicode-safe, with an optional URL-safe output mode.
Your text is encoded and decoded locally in your browser. It is never uploaded to our servers.
Base64 represents binary data as plain ASCII text by encoding every 3 bytes into 4 printable characters, using the alphabet A–Z a–z 0–9 + / with = as padding. That makes it roughly 33% larger than the original, but safe to transmit through systems that only understand text — email attachments, JSON payloads, and data: URIs are classic examples.
Base64 is an encoding, not encryption: anyone can decode it without a key. Never use it to protect secrets.
The URL-safe variant (RFC 4648 §5) replaces + with - and / with _, so the result can sit in URLs without further escaping — JWTs use exactly this variant. This tool also handles UTF-8 correctly, so emoji and non-Latin characters round-trip without corruption (a common bug with naive btoa() implementations).
JWT headers and payloads are Base64url-encoded JSON. Paste one segment here and click Decode to read it — or use our JWT Decoder for the whole token with security checks.
Small images are often embedded as data:image/png;base64,... URIs. Use this tool to verify a pasted data URI decodes to what you expect.
HTTP Basic Auth sends "Basic " + Base64(username:password). Decode an Authorization header to see which account it belongs to.
If decoded Base64 shows mojibake, the original data was encoded with a different charset than UTF-8 — or the string is not Base64 at all. The error message tells you which.
Percent-encode and decode URLs and query parameters, component or full-URL mode.
Encode and decode Punycode (IDN) domain names — convert Unicode domains to xn-- form and back.
Encode and decode Base32 (RFC 4648) — the encoding used by TOTP authenticator secrets.
Escape quotes, backslashes, and newlines so text can be embedded safely inside a JSON string.
Looking for something else? Browse all tools