Base64 encoder & decoder
Convert text or files to Base64 and back. Handles UTF-8, emoji and accents, offers a URL-safe variant and runs entirely in your browser.
- Files stay on your device
- Free, no sign-up
- No installation
- Instant results
File to Base64
Base64 to file
How to use it
- Choose Text or File mode.
- Paste your text and press Encode or Decode, or pick a file to convert it to Base64.
- Copy the result, or download the decoded file.
Base64 is a way of writing binary data using only 64 safe characters (letters, digits, + and /). It is used to embed images in HTML and CSS as data URIs, to send attachments in email, to carry binary values inside JSON and to store tokens. It is an encoding, not encryption: anyone can decode it, so never use Base64 to hide passwords or secrets.
Text is converted as UTF-8, so accents, emoji and non-Latin alphabets are encoded and decoded correctly, which the browser’s plain btoa function cannot do on its own. The URL-safe option replaces + and / with - and _ (as used in JWTs and many web APIs), and you can remove the = padding. When decoding, whitespace and line breaks are ignored and both variants are accepted.
Encoded data is about 33% larger than the original. In File mode the file is read locally and never uploaded. Very large files can freeze a browser tab, so the tool warns above 25 MB.
A closer look
Base64 turns binary data into plain text so it can travel inside JSON, email or a URL, at the cost of about one third more size. It is encoding, not encryption: anyone can reverse it, so never use it to hide passwords.
Developers often paste sample data into online tools, so a tool that runs locally in the browser, without sending the content to a server, is the safer habit for tokens, keys and customer records.
Frequently asked questions
Is Base64 encryption?
No. It only changes how data is written. Anyone can reverse it, so do not use it to protect sensitive information.
Why is my decoded text garbled?
The input may not be valid Base64, may be encoded as something other than UTF-8, or may contain binary data such as an image. Try File mode to save it as a file.
What is URL-safe Base64?
A variant that uses - and _ instead of + and /, so the value can be used in URLs and filenames without escaping.
Are my files uploaded?
No. Everything is processed in your browser.
More free tools
A practical example
When preparing a test fixture, start with synthetic values. Copy the result into a disposable test file and confirm the receiving app interprets it as expected.