Base64 Encoder and Decoder
Encode any text to Base64 or decode a Base64 string back to text. Use the URL-safe variant when you need to embed the result in a URL or filename. Conversion happens locally in your browser.
Encode any text to Base64 or decode a Base64 string back to text. Use the URL-safe variant when you need to embed the result in a URL or filename. Conversion happens locally in your browser.
Base64 is a binary-to-text encoding that represents arbitrary bytes using only 64 printable ASCII characters: A-Z, a-z, 0-9, plus + and / (or - and _ in the URL-safe variant). It is the standard way to embed binary data — images, certificates, encrypted blobs — inside text-only formats like JSON, XML, email or HTTP headers.
Encoding inflates size by exactly 4/3 (33%): every three bytes of input become four output characters. The encoding is fully reversible, so decoding gives back the original bytes byte-for-byte. The URL-safe variant swaps + and / for - and _ to avoid breaking URL encoding rules.
This tool currently handles text only. For files, drag-and-drop into the converter is on the roadmap. As a workaround, paste the file contents (e.g. via xxd or another tool) or use a desktop utility like base64.
Yes. The input is first encoded as UTF-8 bytes, then those bytes are Base64-encoded. Emoji, accents and CJK characters all round-trip correctly through encode + decode.
Standard Base64 uses + and /, both of which are reserved in URLs. The URL-safe variant (RFC 4648 §5) replaces them with - and _, and drops the trailing = padding. Use this variant for URLs, filenames or JWT segments.