Tools marked “Coming soon” are being built now.

Developer tools
Developer · Free · Private

Base64 Encode / Decode

Turn text or files into Base64, and Base64 back into readable text or the original file.

  • Runs in your browser
  • No upload
  • No sign-up
What to convert
Direction

About this tool

Base64 is a way of writing any data, from a sentence to a photo, using only 64 plain characters: A–Z, a–z, 0–9, + and /. It shows up wherever binary data has to travel through something built for text: email attachments, images embedded in web pages and CSS, API tokens, configuration files and keys.

This tool works both ways. Encode text, with full support for accents, Chinese, Arabic and emoji, or encode any file into plain Base64 or a ready-to-paste data URL. Decode Base64 back to text, or back to a file: the tool works out what kind of file it is from the bytes themselves, shows a preview if it’s a picture, and lets you download it with the right extension.

When something can’t be decoded, you get a clear reason, such as which character isn’t valid Base64, an = sign in the wrong place, or a length that shows a piece is missing, with a button that puts the cursor on the problem. Everything runs on your own device, which matters because Base64 often hides passwords, tokens and private documents.

How to use Base64 Encode / Decode

  1. Choose Text or File, then Encode or Decode.
  2. For text, type or paste into the left box. The result appears on the right as you type.
  3. To encode a file, press “Choose a file” or drop one in. Pick “Base64” or “Data URL” for the output.
  4. To decode a file, paste the Base64 or the whole data URL into the left box. The right side shows the file type, its size and a preview.
  5. Press Copy or “.txt” to keep a text result, or “Download file” for a decoded file. Swap turns the result into the new input, so you can check a round trip.
Example

The text “Hi 👋” encodes to SGkg8J+Riw== because the waving hand emoji is four bytes in UTF-8. Ticking “Web-safe” gives SGkg8J-Riw instead: + becomes -, and the padding is dropped.

Features

  • Text is encoded as UTF-8, the standard used on the web, so emoji and every language round-trip exactly.
  • Web-safe Base64 (also called base64url): - and _ instead of + and /, with no = padding, for links, file names and JSON Web Tokens.
  • Optional line breaks every 76 characters (email, MIME) or 64 (PEM keys and certificates).
  • Files of any type up to 200 MB, encoded in a background worker so the page stays responsive.
  • Data URL output, e.g. data:image/png;base64,…, ready for HTML, CSS or JSON.
  • Decoding accepts both alphabets, missing padding, spaces and line breaks, and full data URLs.
  • File type detection from the content for about 40 kinds, including PNG, JPG, GIF, WebP, AVIF, PDF, ZIP, Word, Excel, MP3, MP4, fonts, SVG and JSON.
  • Exact error messages naming the bad character and its position.

Tips and good to know

  • Base64 makes data about a third bigger: 3 bytes become 4 characters. It’s an encoding, not encryption — anyone can decode it.
  • If decoded text comes out as nonsense, the original probably wasn’t UTF-8 text. Switch to File to download the bytes as they are.
  • Pasting a JSON Web Token? Decode one part at a time: the token is three web-safe Base64 pieces joined by dots, and dots aren’t Base64.
  • Very long results show only the first 300,000 characters on screen. Copy and the .txt button always give you the whole thing.

Frequently asked questions

Is my text or file uploaded?

No. Encoding and decoding happen in your browser on your own device. Nothing you type, paste or choose is sent to AroraTools or anyone else.

Is it free? Is there a size limit?

It is free with no sign-up. Files up to 200 MB can be encoded. Very long results are fully copied and saved, though only the start is shown on screen.

Does it work on iPhone, Android or offline?

Yes, in Safari, Chrome and Firefox on phones and computers. You need a connection to open the page; after that the converting happens on your device.

Why does my decoded text look garbled?

The Base64 probably holds a file, or text saved in an older encoding than UTF-8. If it isn’t text at all, the tool says so and offers to open it as a file instead.

What is the difference between Base64 and a data URL?

A data URL is Base64 with a short label in front, such as data:image/png;base64, that tells a browser what kind of file it is. You can paste it straight into an img tag or a CSS background.

What does the = at the end mean?

It is padding. Base64 works in groups of 4 characters, and one or two = signs fill the last group when the data doesn’t divide evenly. The web-safe form usually leaves them out; this tool decodes either way.

Page last reviewed