Base64 to PDF Converter Online - Decode Free

Paste your Base64 text in the box and hit convert. You get a preview of the document right on the page, then a download button for the finished PDF.

You can paste the raw characters or the full data URI. Both work. The decoding happens in your browser, so the string is never sent anywhere, and there is no signup.

Convert Base64 to PDF with Pi7

How to Convert Base64 to PDF

  1. Paste the string into the box above.
  2. Click Convert To PDF. The preview loads underneath.
  3. Click Download PDF to save the file.

What to Paste, and What to Strip

A Base64 PDF usually shows up in one of two shapes. Both are fine here.

  1. Raw string - starts with JVBERi0, which is what %PDF- looks like once encoded. If you see that, you have a real PDF.
  2. Data URI - starts with data:application/pdf;base64, then the same characters.

That JVBERi0 opening is a handy check. If your string starts with something else, it is probably not a PDF, and the decode will produce a file that will not open.

Why a String Sometimes Will Not Open

When the download gives you a broken file, it is nearly always one of these four things.

  1. The string got cut off. Copying from a terminal or a log viewer often truncates it. The length should divide evenly by 4.
  2. The padding was stripped. Some tools drop the trailing = signs. Add them back until the length divides by 4.
  3. It is URL-safe Base64. If you see - and _ instead of + and /, swap them back before pasting.
  4. Line breaks got baked in. MIME wraps at 76 characters. Stray newlines are usually harmless, but a stray space in the middle is not.

Everything Runs In Your Browser

Most decoders post your string to a server, build the PDF there, and send back a link. This page does not. Your browser turns the text into a file on your own machine.

That matters because a Base64 PDF is often an invoice, a signed contract, or an API response you were debugging. None of that should sit in a stranger's logs. Nothing here is stored, because nothing here is sent.

Base64 to PDF in Code

If you need this inside an app rather than in a browser tab, the one-liners are short.

  1. Python - open('out.pdf','wb').write(base64.b64decode(s))
  2. Node.js - fs.writeFileSync('out.pdf', Buffer.from(s,'base64'))
  3. C# / .NET - File.WriteAllBytes("out.pdf", Convert.FromBase64String(s));
  4. Browser JS - build a Blob from atob(s) and hand it to a download link.

All four fail the same way on a truncated string, so check the length before you blame the language.

Encoding a PDF Into a String

Need to turn a file into a string instead? The PDF to Base64 encoder gives you the data URI, an embed snippet, and the raw text.

For pictures, Base64 to image decodes to PNG or JPG, and file to Base64 handles any format you throw at it.

Common Questions

Do I need to remove the data URI prefix first?

No. Paste either form. The tool adds the prefix if it is missing and leaves it alone if it is already there.

Is my string sent to a server?

No. The decode runs in your browser and the file goes straight to your downloads. Nothing travels over the network.

Is there a limit on string length?

No fixed cap. Very long strings, past a few MB of text, can make the browser tab slow while it works, since your own device is doing the decoding.

Made With By Pi7