Skip to content
I Hate Online Tools

Base64 text

Encode or decode plain text as Base64 — not the image tool.

This runs in your browser. Nothing is uploaded.

About Base64 text

Encodes and decodes plain text as Base64 in your browser — the text counterpart to the image-to-Base64 tool, still with no upload.

I already shipped a tool that turns an image file into a data URL. This one is the other job: a string, UTF-8, to Base64 and back. People mix them up, then paste a paragraph into an image converter or a PNG into a text box. Different inputs, different pages.

Encode walks the UTF-8 bytes and runs the browser's Base64 encoder, so emoji and non-Latin text survive. Decode accepts whitespace in the payload — some mail clients fold the lines — then rejects anything that is not valid Base64 instead of emitting garbage. The result stays in the tab. If the string is a password reset token or a cookie value you are inspecting, that is the whole reason it does not go to a 'base64 decode online' host.

There is no file-to-Base64 here. Dropping a binary into a text decoder is how you get a mojibake lecture. Use image-to-Base64 for pictures. I also will not wrap the output as a data: URL; you can prefix that yourself if you are building one by hand.

How to use Base64 text

  1. 1Paste the text (or the Base64) into the input.
  2. 2Choose Text → Base64 or Base64 → Text.
  3. 3Copy the result. A decode error means the input was not valid Base64.

What it won't do

  • Text only — not a binary file encoder.
  • No data: URL wrapper and no Base64url (the URL-safe alphabet).

Common questions

How is Base64 text different from the image-to-Base64 tool?

Image-to-Base64 reads a picture file and can emit a data URL. This page reads characters. Feeding an image into a text encoder would interpret bytes as UTF-8 and lie to you. Use the convert tool for files, this one for strings.

Does Base64 text encoding handle Unicode and emoji?

Yes. The string is encoded as UTF-8 before Base64. Decode reverses that with a TextDecoder. If you encoded the same string as Latin-1 somewhere else, the output will not match — that is a mismatch of encodings, not of Base64.

Why did Base64 decode say the string was invalid?

Length not a multiple of four after stripping space, or characters outside the alphabet. Some encoders skip padding. This decoder wants standard Base64. Add = padding or fix the alphabet before trying again.

Related tools

Why this one doesn't upload your file

There is no server to upload to. This page is a static file, and the work happens in your browser using the same graphics and WebAssembly code that renders every other site you visit. Your file is read from disk into memory, processed, and handed back as a download. Once the page has loaded you can disconnect from the network entirely and it keeps working. The longer explanation

Install the app