Skip to content

Base64 encode and decode

Convert text or whole files to Base64, or decode Base64 and data URLs back to text or a downloadable file.

  • Runs in your browser
  • Nothing is sent
  • Works offline

Text

Base64

What Base64 is for

Base64 turns any data, including images and files, into plain text made of letters, numbers, + and /. That lets binary data travel through systems that only handle text, such as JSON, email and HTML attributes.

It isn't encryption: anyone can decode it. It also makes data about a third larger, so use it for embedding small files, not for storing large ones.

  • Data URLs: embed small images directly in HTML or CSS.
  • APIs and tokens: many APIs and JWTs use URL-safe Base64.
  • Email attachments: are Base64-encoded behind the scenes.

How to encode or decode Base64

  1. 01

    Choose a direction

    Pick Encode or Decode. To encode a file, such as an image, click Encode a file.

  2. 02

    Paste your input

    The result appears as you type. Decoding accepts standard, URL-safe and data: URL Base64.

  3. 03

    Copy or download

    Copy the result, or download it as a file when it decodes to an image, PDF or other binary data.

Features

JSON formatter

Pretty-print, validate, sort and minify JSON, with the exact location of any error.

Base64

Encode and decode text and files, including URL-safe Base64 and data URLs.

URL encoding

Percent-encode and decode text, and break any URL into its parts and parameters.

JWT decoder

Read token headers and claims with readable issued and expiry times.

Instant

Results update as you type, with no buttons to press and no waiting for a server.

Private

Nothing you paste leaves your browser, so it's safe for API keys, logs and customer data.

Frequently asked questions

Is my data sent anywhere?

No. Everything runs in your browser, so API responses, tokens and config files never leave your device. It also works offline once the page has loaded.

Does it handle emoji and non-English text?

Yes. Text is encoded as UTF-8 first, so accents, emoji and every script round-trip correctly.

What is URL-safe Base64?

It replaces + and / with - and _ and drops the = padding, so the result can go in URLs and file names. It's used in JWTs.

How do I turn an image into a data URL?

Choose Encode, click Encode a file and pick the image. Copy data URL gives you a string you can use directly in HTML or CSS.

More free tools