Encode text to Base64 or decode Base64 strings instantly. Full Unicode support with URL-safe mode. All processing happens locally in your browser.
Saved Presets is a Supporter feature.
Tool History is a Supporter feature.
Tool Notes is a Supporter feature.
Click "Encode" to convert plain text to Base64, or "Decode" to convert Base64 back to readable text. The tool remembers your selection.
Paste or type your content in the input field. For encoding, enter any text including Unicode characters. For decoding, enter a valid Base64 string.
Enable URL-safe mode before encoding if your output will be used in URLs. This replaces + with - and / with _, making it safe for query strings and paths.
The result appears automatically as you type. Click "Copy" to copy to your clipboard, or "Download" to save as a file. Use "Swap" to quickly reverse the operation.
Base64 encoding converts binary data into a set of 64 printable ASCII characters. The algorithm groups input bytes into sets of 3 (24 bits), then splits them into 4 groups of 6 bits each. Each 6-bit value maps to one of 64 characters in the Base64 alphabet.
A-Z (26 characters) for values 0-25. a-z (26 characters) for values 26-51. 0-9 (10 characters) for values 52-61. + for value 62 (or - in URL-safe mode). / for value 63 (or _ in URL-safe mode). = for padding when input length is not divisible by 3.
Standard Base64 (btoa/atob) only handles ASCII. Our tool uses TextEncoder to convert Unicode text to UTF-8 bytes first, then encodes those bytes. For decoding, we reverse the process with TextDecoder, ensuring full Unicode support.
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (RFC 4648) replaces these with - and _, and optionally removes padding. This allows Base64 strings to be used directly in URLs without percent-encoding.
Embedding images in HTML/CSS using data URIs. Encoding binary data in JSON or XML payloads. Transmitting files via text-based protocols. Encoding credentials for HTTP Basic Authentication. Storing binary data in text-only databases.
Base64 increases data size by ~33%. Not suitable for encryption or security. Very large inputs may cause browser performance issues. Some special padding scenarios may require URL-safe mode.
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, + and /) plus = for padding. It's commonly used to embed binary data in text-based formats like JSON, XML, or HTML.