Base64 to PDF

Paste a Base64 string or data: URI and download it as a PDF file. The tool checks that the bytes really are a PDF before you save it.

0 bytes
0 chars

Everything runs in your browser. Your text and files are never uploaded.

How to convert Base64 to a PDF

  1. Paste the Base64 string into the left box. A full data:application/pdf;base64,... URI works too. A small sample PDF is already loaded so you can see the result.
  2. Check the status line. It should say it found a PDF file and show the size. If it says the data is text or another type, the string is not a PDF.
  3. Click Download. The file is saved as decoded.pdf and opens in any PDF reader.

To go the other way, choose a PDF in the Base64 encoder and copy the output.

How to recognise a Base64 PDF

Every PDF file starts with the bytes %PDF- followed by a version number. In Base64, those bytes become JVBERi0. So if a long string from an API starts with JVBERi0, you are almost certainly looking at a PDF. The sample in the tool starts that way: decode it and you get a one-page PDF that says "Hello from base64encode.app".

Base64 starts with File type
JVBERi0 PDF
iVBORw0KGgo PNG image
/9j/ JPEG image
UEsDB ZIP (also DOCX, XLSX)

Where Base64 PDFs come from

PDFs often travel as Base64 because the systems in between only carry text:

In each case, the Base64 text is the whole file. Nothing is compressed or encrypted on top, so decoding gives you back the exact original.

Fixing a Base64 PDF that will not open

Is it safe for private documents?

The conversion runs entirely in your browser using JavaScript. The PDF is not uploaded, stored or logged, so you can decode invoices, contracts or ID scans here. For other kinds of encoded files, use the general Base64 decoder.

Frequently asked questions

How do I convert Base64 to PDF?

Paste the Base64 string into the left box. When the status line says it found a PDF file, click Download and the file is saved as decoded.pdf, ready to open in any PDF reader.

How do I know the Base64 is a PDF?

A Base64-encoded PDF almost always starts with JVBERi0, which is the encoding of %PDF-. The tool also checks the decoded bytes and names the file type it finds.

Why does the downloaded PDF not open?

The Base64 string was most likely cut off, which is common with long strings copied from logs or chat apps. Copy it again from the original API response, without surrounding quotes.

Is my PDF uploaded?

No. Decoding and the download happen in your browser. The PDF is never sent to a server, so it is safe for invoices, contracts and other private documents.