Skip to content
cliplimeClipLime

Base64 decode

Turn Base64 back into text, or into a file you can download.

Your text and files stay in your browser

Both alphabets, missing padding and line breaks are fine. A full data URL works too.

0 characters, 0 lines

Only changes how the bytes are read as text. Download always saves the exact bytes.

At a glance

What it does
Decodes Base64 into text, or into a file you can download.
Accepts
Standard and URL-safe Base64, with or without padding, line breaks, and full data URLs.
Finds the type
Looks at the first bytes to name the file type (PNG, PDF, ZIP, JSON and more) and picks the right extension.
Text encodings
Reads the bytes as UTF-8, UTF-16 little endian or Latin-1, so accented text does not turn into garbage.
Previews
Shows decoded images and audio, and a hex view of the first bytes of any other file.
Privacy
Decoding runs in your browser. Nothing is uploaded.

How to do it

  1. 1

    Paste the Base64

    Paste it as it is, including line breaks or a data: prefix. You can also load a text file that contains it.

  2. 2

    Read the result

    Text appears straight away. For a file, you see its detected type, its size and a preview when it is an image or audio.

  3. 3

    Fix the text encoding if needed

    If accented letters look wrong, change Show text as to Latin-1 or UTF-16. The bytes themselves do not change.

  4. 4

    Download if you need the file

    Download saves the exact decoded bytes with a sensible name and extension.

When decoded text looks like garbage

Base64 decodes to bytes, and bytes only become letters once you pick an encoding. Three things usually go wrong:

  • The text was not UTF-8. Latin-1 text with an accent, such as é, is a single byte that is not valid UTF-8. Switch Show text as to Latin-1. Text from PowerShell encoded commands is UTF-16, which this tool treats as binary data until you choose UTF-16 as the text encoding.
  • It is not text at all. Images, PDFs and archives decode to bytes that were never characters. The tool shows the detected type and offers a download instead of a wall of symbols.
  • It was Base64 twice. If the result is itself a Base64-looking string, paste it back in and decode again.

Base64 you will meet in the wild

  • HTTP Basic authentication: the header Authorization: Basic dXNlcjpwYXNz carries user:pass in Base64. This is why Basic authentication must always run over HTTPS.
  • JWTs: the first two parts of a token are URL-safe Base64 of JSON. To read them with a signature check and readable dates, use the JWT decoder.
  • Data URLs: data:image/png;base64, followed by Base64. Paste the whole thing and the prefix is understood.
  • API responses: files and images are often sent as Base64 strings inside JSON. If the string has backslashes before slashes (\/), remove them first.

What the error messages mean

  • Not part of the Base64 alphabet: a character such as a space inside a word, a quotation mark or a % slipped in. The message says which character and where.
  • A remainder of 1: the text has one character too many or too few. Base64 length can only leave a remainder of 0, 2 or 3 when divided by 4, so the text was probably cut off.
  • Padding in the middle: = can only be at the very end. This usually means two Base64 strings were joined together.

Questions people ask

Why does my decoded text show strange symbols?

The bytes were probably not UTF-8. Change Show text as to Latin-1 or UTF-16 little endian. If it still looks wrong, the data may be a file rather than text, and Download will save it unchanged.

Does the decoder accept URL-safe Base64 and missing padding?

Yes. It reads - and _ as well as + and /, accepts text without the = padding and ignores spaces and line breaks. It tells you which of these it found.

Can I decode a data URL?

Yes. Paste the whole data:...;base64,... text, or even an img tag or CSS url() that contains one. The prefix is read and the data inside is decoded.

How does it know what kind of file the bytes are?

Most file formats start with a fixed signature, such as %PDF- for PDF or PK for ZIP. The tool checks those first bytes. If nothing matches and the bytes are not valid text, the type is shown as unknown.

Is decoding Base64 the same as decrypting it?

No. Base64 is not encryption, so decoding needs no key and anyone can do it. Anything you can decode here, anyone who sees the Base64 can decode too.

Are my Base64 strings sent anywhere?

No. Decoding happens in your browser and the text is never uploaded.