Base64 Encoder & Decoder
Encode text or files to Base64 and decode Base64 back to text. UTF-8 safe, with Base64URL support. Runs entirely in your browser.
The file is read locally and never uploaded.
Base64
Data URL
How to Use
- 01 Choose a direction Encode turns text into Base64, Decode turns Base64 back into text. The result updates while you type.
- 02 Pick the alphabet Turn on URL-safe for Base64URL, used in JWTs and URLs: “-” and “_” instead of “+” and “/”, no padding.
- 03 Or drop a file Pick a file to get its Base64 and a ready-to-use data URL, for example to inline a small image in CSS.
About this tool
Base64 turns binary data into 64 printable characters (A–Z, a–z, 0–9, + and /) so it can travel through systems that only handle text: email attachments, JSON, data URLs, HTTP headers.
Base64URL is a variant for URLs and file names. It replaces + and / with - and _ and usually drops the = padding. JSON Web Tokens use it for all three parts.
Frequently Asked Questions
No. Base64 is an encoding: anyone can decode it without a key. Never use it to hide passwords or secrets.
Base64 represents every 3 bytes with 4 characters, so the output is roughly 33% larger than the input.
Yes. Text is converted to UTF-8 bytes first, so ä, ß, € and emoji survive the round trip. The browser’s built-in btoa() alone would fail on them.