Base64 Encode & Decode
Convert text or files as you type. Decoded binary data is detected, previewed and downloadable.
- Runs in your browser
- Nothing uploaded
- Up to 10 MiB
- UTF-8 and URL-safe
The result appears here as you type.
How it works
Text is first turned into UTF-8 bytes, then every 3 bytes become 4 Base64 characters. That is why encoded output is about a third larger, and why the result matches what servers and command-line tools produce.
URL-safe Base64
Standard Base64 uses +, / and =, which have special meanings in URLs. The URL-safe form (base64url, used in JWTs) uses - and _ and drops the padding. Decoding accepts both forms and ignores line breaks.
Base64 is not encryption
Anyone can decode Base64. Do not use it to hide passwords or keys.
Files and images
Drop any file to get its Base64 or a ready-to-paste data: URL. When decoded Base64 turns out to be binary, the file type is detected from its signature (PNG, JPEG, GIF, WebP, PDF, ZIP and more), images are previewed, and you can download the file.
Features
- Converts as you type in either direction
- UTF-8 text, including emoji and non-Latin scripts
- Standard, URL-safe (base64url) and 76-character MIME output
- Encode each line separately
- Files to Base64 or data: URLs by drag and drop
- Decoded binary detected by file signature, images previewed, files downloadable
- Up to 10 MiB, processed locally
Frequently asked questions
What is Base64 used for?
Base64 turns bytes into plain ASCII text so they can travel through systems that expect text: email attachments, data URLs, HTTP Basic authentication headers and JSON Web Tokens.
Is Base64 encryption?
No. Anyone can decode Base64 without a key. It is an encoding, not a way to protect secrets.
What is the difference between Base64 and base64url?
base64url replaces + with - and / with _ and usually drops the = padding, so the result is safe in URLs and file names. JWTs use base64url.
Why is the encoded text longer?
Every 3 bytes become 4 characters, so Base64 output is about 33% larger than the input bytes.