Base64 Encoder / Decoder Free Online

Encode text to Base64 or decode Base64 back to text with one click. Also supports file-to-Base64 conversion, generating data URLs you can embed in HTML or CSS. Copy the result with the copy button. Everything runs in your browser with no upload. Useful for developers, email encoding, embedding images in code, and data transfer.

Loading the tool...

When to use it

Embed a small icon in HTML or CSS

Switch the type to "File" and drop a small icon. The "Data URL (Base64)" box shows a string starting with data:image/..., which you can copy and paste into an img src or a CSS url() with no separate file.

Read a Base64 string from API docs

Choose "Decode" and "Text", paste the string into the input and press "Convert". It is read as UTF-8, so accented letters and Korean come out correctly.

Encode a sentence for test data

Choose "Encode" and "Text", type the sentence and press "Convert" to get a quick Base64 string for a header or a config value.

How to use

  1. Choose Encode or Decode mode.
  2. Paste or type your text in the input box.
  3. Press Convert. Copy the result with the Copy button.

How it works

Text encoding uses the browser's built-in btoa() and atob() functions with UTF-8 handling for international characters. File conversion uses the FileReader API to read files as data URLs (Base64-encoded with MIME type prefix). Everything runs client-side in JavaScript, so your data is never sent to any server. How to verify. Also available as a free REST API for developers and AI agents (edge-processed, zero retention).

FAQ

What is Base64?

Base64 is a binary-to-text encoding that represents binary data as ASCII characters. It is commonly used in emails, data URLs, and API tokens.

Can I encode Unicode text?

Yes. The tool handles UTF-8 encoding correctly, so characters like Korean, Chinese, emoji and accented letters all work.

Can I convert files to Base64?

Yes. Switch to File mode, drop a file, and get a data URL (Base64 string with MIME type) you can embed in HTML or CSS.

Is there a size limit?

There is no hard limit, but very large files may be slow or hit browser memory limits.

Is my data uploaded?

No. Everything runs in your browser. Your text and files never leave your device.

Can I decode Base64 back to an image or file?

No. "File" only turns a file into a data URL string, and "Decode" only turns Base64 back into text. To get the file back you would need another tool.

Why does decoding show an error?

If the string begins with something like data:image/png;base64, remove that part and paste only what follows. A string that was cut off, or one in URL-safe form (with - and _), can also fail.

Is Base64 a way to keep things secret?

No. Anyone can decode it, so turning a password or personal data into Base64 does not protect it.

Last checked: October 10, 2026 · Dagochim team

Related tools