About this tool
Base64 turns any bytes into a small alphabet of safe characters at the cost of about a third more size — the toll binary data pays to travel through text systems: email, JSON, URLs, data URIs. This studio handles the details people trip over. Text is encoded as UTF-8 first, so accented letters and emoji survive the round trip (the classic bug is encoding only Latin-1 and mangling everything else). Files are read as bytes and encoded directly, ready to embed or transmit.
The URL-safe variant matters more than it looks: standard Base64 uses + and /, which mean other things inside a URL, so tokens and parameters use the - and _ alphabet and often drop the padding. The decoder here is forgiving in the right ways — it accepts both alphabets, padded or not — and strict in the right way too: characters outside the alphabet produce a clear error instead of silent corruption.
How to use it
- Type text, or choose a file to encode it directly.
- Tick URL-safe if the result goes into a link or token.
- Encode or decode; copy from the result panel.
Good to know
- Base64 is encoding, not encryption — anyone can decode it. Never treat an encoded secret as a protected one.
- Data URIs (data:image/png;base64,…) are the fastest way to embed a small image in CSS or HTML — encode the file here.
- If decoding fails, look for line breaks or spaces pasted from an email — the tool tolerates whitespace, but a truncated string fails honestly.
Frequently asked questions
Why is the output longer than the input?
Base64 represents 3 bytes with 4 characters — a fixed ~33% growth, the price of a safe alphabet.
Does Unicode text survive?
Yes. Text is encoded from its UTF-8 bytes, so emoji and non-Latin scripts round-trip correctly.
Is my file uploaded for encoding?
No. Files are read and encoded in your browser.
More Developer tools
JSON Formatter & Validator
Pretty-print messy JSON, minify it back, and get a precise error location when it will not parse.
JSON to CSV
Turn a JSON array of objects into a clean spreadsheet-ready CSV, columns and escaping handled.
CSV to JSON
Convert spreadsheet CSV into a JSON array — quoted fields, embedded commas and all.
XML Formatter
Indent and validate XML — sitemaps, feeds, config files — with errors pointed at the guilty tag.
JS / CSS / HTML Beautifier
Untangle minified or messy code into readable, consistently indented JavaScript, CSS or HTML.
JS / CSS Minifier
Strip comments and needless whitespace from JavaScript and CSS — smaller files, same behaviour.
Making videos too? Try our YouTube SEO Checker, or browse the full Toolkit and the free YouTube tools.