Skip to content

Base64 Encode and Decode Online

Turn text into Base64 or decode a Base64 string back to text or a file. Everything happens in your browser, so nothing you paste is uploaded.

0 characters · 0 lines
0 characters · 0 lines

Runs entirely in your browser. Nothing you paste is sent anywhere.

How to encode or decode Base64

  1. Choose Encode or Decode at the top of the tool.
  2. Paste your text into the left box, or press Try an example. When encoding, switch on URL-safe if the result will go into a link, a file name or a token.
  3. Read the result in the right-hand box. It updates as you type. If a Base64 string decodes to a file rather than text, press Download file to save it.
  4. Copy or download the output as a .txt file. Press Use result as input to move the output back to the input box and reverse the direction, which is a quick way to check a round trip.

Features

  • Full Unicode support: text is converted to UTF-8 bytes first, so Urdu, Arabic, Hindi, Chinese and emoji survive the round trip.
  • URL-safe option that swaps + and / for - and _ and removes the = padding.
  • Forgiving decoder that accepts missing padding, line breaks, spaces, the URL-safe alphabet and a data: URI prefix.
  • Binary detection: when decoded data isn't text, you can download it as a file, with PNG, JPG, GIF, WebP, PDF and ZIP recognised automatically.
  • Clear error message when the input isn't valid Base64.
  • Live character and line counts for both boxes.
  • Copy, download and swap buttons.

Why use Fileora's Base64 tool

Base64 strings often hold things you shouldn't hand to a stranger: API credentials in a Basic authentication header, the payload of a session token, a configuration secret, or a scanned document embedded in an email. Many online decoders send whatever you paste to their server. Fileora decodes and encodes with your browser's own functions, so the data stays on your device and nothing is logged.

The tool is free, needs no account and has no usage limit. The layout places the two boxes side by side on a laptop and stacks them on a phone, so you can decode a string from a message without opening a computer.

Working with images? The image to Base64 converter produces ready-made data URIs for HTML and CSS. To inspect a login token, the JWT decoder splits it into header and payload for you, and the JSON formatter tidies any JSON you decode here.

How Base64 works

Computers store everything as bytes, but email, JSON, XML and URLs were designed for text. Base64 bridges the gap. It takes the input 3 bytes (24 bits) at a time, splits those bits into four groups of 6, and maps each group to one of 64 safe characters: A–Z, a–z, 0–9, + and /. If the input length isn't a multiple of 3, one or two = signs pad the last group.

That is why Base64 output is always about 33% larger than the input, and why its length is normally a multiple of 4. For example, the word "Hi" is two bytes and becomes SGk=. Because the mapping is fixed and public, Base64 hides nothing: it is a transport format, not a lock.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is an encoding, not encryption. It uses no key, and anyone can decode it in a second, including with this tool. It exists to carry binary data safely through systems that only handle text. If you need to keep something secret, encrypt it; if you need to check that data hasn't changed, use a hash.

Why does my decoded text show strange characters on other sites?

Many simple decoders treat each byte as a separate character, which garbles anything outside basic English, such as Urdu, Hindi, accented letters or emoji. This tool encodes text as UTF-8 before converting it to Base64 and decodes it as UTF-8 afterwards, so every language and emoji comes back exactly as it went in.

What is URL-safe Base64?

Standard Base64 uses the + and / characters and pads the end with =. Those characters have special meanings in URLs and file names. The URL-safe variant, also called Base64URL, uses - and _ instead and drops the padding. It is the format used inside JSON Web Tokens and many web APIs.

My Base64 has no = at the end. Can it still be decoded?

Yes. The decoder adds any missing padding itself. It also ignores spaces and line breaks, accepts both the standard and URL-safe alphabets, and strips a data: URI prefix such as data:image/png;base64, so you can paste the string exactly as you found it.

What happens if the Base64 contains an image or a PDF?

If the decoded bytes aren't readable text, the tool tells you it has found binary data and offers a Download file button. It recognises PNG, JPG, GIF, WebP, PDF and ZIP from their first bytes and gives the file the right extension. Other binary data downloads as a .bin file.

Why is the Base64 output longer than my text?

Base64 represents every 3 bytes of input with 4 characters, so the output is about a third larger than the original. Non-English characters take 2 to 4 bytes each in UTF-8, so their Base64 grows even more compared with the visible character count.

Can't find the tool you need, or something isn't working?

Tell us which tool you'd like next or what went wrong. We read every message, and requests decide what we build next.

Opens your email app. Please don't attach private files.