Base64 Encoder / Decoder
Encode text or files to Base64, or decode Base64 back to text.
Base64 encodes binary or text data as a string of ASCII characters using 64 printable symbols
(A–Z, a–z, 0–9, +, /). It is commonly used to embed binary data in JSON, HTML, CSS
(data: URLs), and email payloads. Each 3 bytes of input become 4 characters of
output — approximately 33% overhead.
Base64URL is a URL-safe variant that replaces + with - and / with _, and omits = padding. It is
used in JWTs, URL parameters, and filenames where standard Base64 characters would need
percent-encoding.
This tool uses the browser's built-in btoa/atob APIs and supports
full Unicode text. Files are encoded in chunks to handle large inputs without crashing.
Decoding binary data — an image, a PDF, a compressed payload — never turns its bytes into replacement characters. When the decoded bytes are not valid UTF-8 text, they are shown as hex, the format is named when it is a PNG, JPEG, PDF, ZIP or gzip file, and you can download the exact bytes.
When one step is not enough — a string that is base64, then gzip, then JSON — use CyberChef. It chains operations into a recipe and has around 500 of them, runs entirely in your browser, and is free and open source with no account, though its page runs Google Analytics.
Link to this tool with values filled in
Everything after the # stays in your browser — it is never sent to a server — so a
link like this opens the tool ready to go without the values travelling anywhere but the address
bar:
https://crunchify.net/tools/base64#text=hello%20world&mode=encode
Join the settings with &, and percent-encode each value so that spaces,
newlines and any #, &, = or % inside one
do not break the link. Leave a setting out to accept its default. If a setting is not recognised,
the page says so rather than quietly ignoring it.
text(alsoinput,value,qordata) — text, up to 1024 characters, required. The text to encode, or the Base64 to decode.mode(alsodirectionorop) — encode or decode, defaults toencode. Which direction to run.variant(alsoalphabet,flavourorflavor) — base64 or base64url, defaults tobase64. `base64url` uses `-` and `_` instead of `+` and `/` and drops the `=` padding — the form used in JWTs and URLs.
The tool reads these on arrival but never writes them back, so what you type here stays out of your browser history.
What is Base64 encoding used for?
Base64 encodes binary data as printable ASCII text so it can be safely transmitted in contexts that only handle text, such as email (MIME), JSON, HTML data: URLs, and HTTP headers. It is not encryption — it is purely a text-safe encoding.
How much does Base64 increase the size of data?
Approximately 33% overhead. Every 3 bytes of input become 4 Base64 characters. A 1 MB file encodes to roughly 1.37 MB of Base64 text.
What is the difference between Base64 and Base64URL?
Standard Base64 uses + and / characters which have special meaning in URLs. Base64URL replaces + with - and / with _, and omits = padding, making the output safe for URL parameters, filenames, and JWTs without percent-encoding.
How do I decode a Base64 string?
Paste the Base64 string into the input field and select Decode. If the string ends with = signs (padding), that is standard Base64. If it uses - and _ instead of + and /, switch to Base64URL mode.
Why does my decoded Base64 show up as hex?
Because the bytes are not text. Base64 often carries images, PDFs or compressed data, and showing those as text would replace every byte that is not valid UTF-8 with a placeholder character, losing it. The hex is exact and copyable, and the Download button saves the original file.
Related Tools
Updated October 12, 2026