Base64 Encoder / Decoder

Convert text, images, and files to Base64 and back. Supports full UTF-8, URL-safe Base64, and data URLs for embedding images in HTML and CSS.

  • UTF-8 safe
  • Images & files
  • Data URLs
Text
Base64
How to use

How to use Base64 Encoder / Decoder

  1. 01

    Pick a mode

    Use the Text tab for strings, or the File tab to encode images and documents or decode Base64 back into a file.

  2. 02

    Convert instantly

    Results update as you type. Enable URL-safe mode for tokens and URLs.

  3. 03

    Copy or download

    Copy the Base64 string or data URL, or download the decoded file.

Guide

About Base64 Encoder / Decoder

Base64 Encoder & Decoder converts text and files to Base64 and back. Use it to embed images directly in HTML or CSS, inspect tokens, or decode Base64 strings from APIs and emails into readable text or the original file.

What is Base64?

Base64 is a way to represent any binary data, such as images, PDFs or encrypted bytes, using only 64 safe text characters: A–Z, a–z, 0–9, + and /. Every 3 bytes of input become 4 characters of output. That makes data about 33% larger, but it can travel safely through systems built for text, like JSON, HTML, email and URLs.

Base64 isn't encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.

Common uses

  • Data URLs: embed small images and icons in HTML (<img src="data:image/png;base64,…">) or CSS to save a network request.
  • APIs: send files inside JSON payloads, or read Base64 fields from responses.
  • Authentication: inspect HTTP Basic Auth headers and the parts of JWT tokens, which use URL-safe Base64.
  • Email: attachments are Base64-encoded inside MIME messages.

Standard vs URL-safe

Standard Base64 uses + and /, which have special meanings in URLs. URL-safe Base64 replaces them with - and _ and usually drops the trailing = padding. Use it for tokens, URL parameters and file names.

Tips

  • Only inline small images (a few KB) as data URLs. Large ones make your HTML or CSS heavy and can't be cached separately.
  • If decoding shows garbled text, the data is probably a file. Switch to the File tab to download it.
  • Text is encoded as UTF-8, so accented letters, non-Latin scripts and emoji survive the round trip intact.

At a glance

Modes
Encode and decode
Input
Text or any file
Text encoding
Full UTF-8 (emoji, accents)
Variants
Standard and URL-safe
Output
String, data URL or file
Privacy
Converted in your browser
Use Base64 Encoder / Decoder Read the guideWhat Is Base64 Encoding? A Simple Explanation With Examples
FAQ

Questions about this tool

Something missing? Write to contact@ultratoolsai.com.

What is Base64?

Base64 represents binary data using 64 text characters, so images and files can be embedded in JSON, HTML, CSS, emails, and URLs.

What is URL-safe Base64?

A variant that replaces + and / with - and _ and drops the = padding, so the result can be used in URLs and filenames without escaping.

How do I embed an image in HTML or CSS?

Encode the image in the File tab and copy the data URL. Use it as <img src="data:…"> or background-image: url(data:…).

Are my files uploaded?

No. Encoding and decoding happen in your browser.