DailyDeskTools home

Base64 Encoder and Decoder

Encode and decode Base64 text with UTF-8 support, and turn files or images into data URLs.

  • Free forever
  • No signup
  • Runs on your device
Base64 Encoder and DecoderRuns locally · nothing uploaded
Loading tool…

How to use the base64 encoder and decoder

  1. 1Choose Encode text, Decode, or File to Base64.
  2. 2Type or paste your text, or drop in a file.
  3. 3Turn on URL-safe output if the result will go in a URL or token.
  4. 4Copy the result or download it as a file.

What Base64 is

Base64 turns any data into plain text using 64 safe characters: A–Z, a–z, 0–9, + and /. It lets binary data travel through systems that only handle text, such as email, JSON and HTML.

Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.

Text, emoji and other languages

Browsers' built-in btoa function fails on characters outside basic Latin. This tool converts text to UTF-8 bytes first, so accented letters, non-Latin scripts and emoji encode and decode correctly.

URL-safe Base64

Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant (Base64URL) replaces them with - and _ and drops the = padding. It is used in JSON Web Tokens and many APIs. The decoder accepts both forms.

Files and data URLs

A data URL embeds a file directly in HTML or CSS, for example data:image/png;base64,iVBOR.... It is handy for small icons and email images. Base64 makes data about a third larger, so keep data URLs for small files.

Frequently asked questions

Is Base64 secure?

No. Base64 is a reversible encoding that anyone can decode. Use proper encryption to protect sensitive data.

Why is my Base64 longer than the original?

Base64 represents every 3 bytes with 4 characters, so the output is about 33% larger than the input.

What happens if I decode an image?

If the decoded data is not text, the tool tells you and offers it as a file download instead.

Are my files uploaded?

No. Files are read and converted by your browser and never leave your device.

Last updated