Base64 encoder and decoder
Turn text or a file into Base64, or paste Base64 to get the original text or file back.
Sealed on this device
Runs in your browser. Nothing is uploaded.
Sealed
Input
Result
The Base64 version will appear here.
This result is very long, so only its beginning is shown. Copy and Download use the full result.
This isn’t valid Base64
How it works
-
Choose the direction
Encode turns text or a file into Base64. Decode turns Base64, or a data URL, back into the original.
-
Add your text or file
Type, paste or drop a file. The result updates instantly, and any invalid character is pointed out.
-
Copy or download
Copy the Base64 or the decoded text, or download the decoded file with its detected type.
Frequently asked questions
Are my files uploaded to encode them?
No. Encoding and decoding happen in your browser, even for large files, so nothing you encode is sent anywhere.
Does it handle accents, emoji and other alphabets?
Yes. Text is converted to UTF-8 before encoding and read back as UTF-8 when decoding, so accents, emoji, Arabic, Chinese and every other script come back exactly as they were.
What is URL-safe Base64?
A variant that replaces + with - and / with _, so the result can go into a URL or a file name without being escaped. It’s used in JSON Web Tokens, for example. The decoder accepts both variants automatically.
What is a data URL?
A data URL embeds a file directly in text, in the form data:image/png;base64,…. You can paste it into HTML or CSS instead of linking to a separate file. It’s best kept for small files, because Base64 is about a third larger than the original.
Is Base64 a form of encryption?
No. Base64 only changes how data is written so it can travel as text. Anyone can decode it, so never rely on it to hide passwords or personal information.