Base64 Encode / Decode

Encode text or a file to Base64 and decode Base64 back to text. Emoji-friendly with clear errors and data URL support. Free, private.

In short: Encode or decode Base64 safely (emoji-friendly), or turn a file into Base64. Free to use in your browser — no sign-up.

What is Base64 Encode / Decode?

Base64 Encode / Decode converts text to Base64 and back, and can turn a small file into a Base64 string or data URL. It handles emoji and non-English text safely.

How to use this tool

  1. Choose Encode, Decode or File → Base64.
  2. Paste your text or Base64 string into the box, or choose a file.
  3. Press Encode or Decode and read the output. A file turns into a data URL as soon as you choose it.
  4. If decoding fails, check that the whole string was copied.
  5. Copy the result for your code, HTML or JSON.

About this tool

Base64 is a way of writing data as plain text so it can travel safely through email, JSON, URLs and HTML. Choose Encode or Decode, paste your text, press the button and the result appears. In File to Base64 mode, choose a file and get a string you can paste into HTML, CSS or JSON as a data URL, which embeds a small image or file without a separate upload.

Base64 makes a file about a third larger, so files of a few hundred KB work well. And remember, Base64 is not encryption: anyone can decode it in seconds, so never use it to hide a password. When decoded text comes out as garbage, the input was usually pasted with a piece missing or is not UTF-8 text — the tool shows a clear error instead of guessing.

Frequently asked questions

Why does my decoded text look like garbage?
Most often the string was copied with a piece missing, or it is not UTF-8 text. The tool shows a clear error rather than guessing, so you know the input is at fault.
What is a data URL?
A data URL packs a whole file into one text string that starts with data:...;base64,.... You can paste small images or files straight into HTML, CSS or JSON and skip the separate upload.
Is Base64 encryption? Does it keep my text secret?
No. Base64 only rewrites data as plain text. Anyone can turn it back in seconds, so it keeps data safe to carry through email and code — not secret from other people.
How large can the file be in File to Base64 mode?
Keep files small: a few hundred KB feels comfortable. Base64 makes a file about a third bigger, and very large files turn into long strings that are hard to handle.
Does it handle emoji and other languages?
Yes. Text is encoded as UTF-8, so emoji and non-English characters round-trip correctly.
Is my data uploaded?
No. Encoding and decoding happen in your browser on your device.
Why does Base64 end with equals signs?
The equals signs are padding that fills out the last group of characters.
Can I turn a Base64 string back into an image?
If the string is an image data URL, you can paste it into the address bar of a browser to view it, then save the image.

Related Text & Utilities tools