Base64 Encoder & Decoder: Text, Files & Images

Encode text or files to Base64, or decode Base64 back into text or the original file. Works with accented letters and emoji, supports URL-safe Base64, and creates data URIs for images.

Runs in your browser. Nothing you enter is sent or saved.

How to encode or decode Base64

  1. For text: type or paste into the input box.
  2. Click Encode to Base64 or Decode from Base64. Tick URL-safe if the result goes in a web address.
  3. For files: switch to File or image and choose a file up to 10 MB.
  4. Copy the result. If decoded Base64 turns out to be a file, such as an image or PDF, download it instead.

Features

  • Full Unicode support: accented letters, symbols and emoji encode and decode correctly.
  • URL-safe Base64 using – and _ with no padding, as used in JWTs and web addresses.
  • Forgiving decoding: accepts standard or URL-safe Base64, with or without padding, line breaks or a data: prefix.
  • Files and images: turn any file into Base64 or a ready-to-use data URI, with an image preview.
  • Detects binary data such as PNG, JPEG, GIF, WebP, PDF and ZIP, and offers it as a download.

Frequently asked questions

What is Base64 used for?

Base64 turns any data into plain letters and numbers so it can travel safely through systems that only handle text, such as email, JSON, HTML and web addresses.

Is Base64 encryption?

No. Anyone can decode Base64. It’s a way of representing data, not of protecting it. Never use it to hide passwords.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meanings in web addresses. URL-safe Base64 replaces them with – and _ and drops the = padding.

What is a data URI?

A data URI puts a whole file inside a link, such as data:image/png;base64,…, so a small image can be embedded directly in HTML or CSS without a separate file.

Need a custom version of this tool or an API for your business? Get in touch.