Toolvist

Base64 to PDF Decoder

Decode a Base64 string into a downloadable PDF file.

Tips: a valid PDF starts with JVBERi0 in Base64.

Free Base64 to PDF Decoder

Paste a Base64 string or a data:application/pdf URL and turn it back into a real PDF file you can preview and download. Decoding happens —.

The reverse for images is the Base64 to Image Decoder, and the generic string form is handled by the Base64 to Hex Converter. To work with the document afterwards, the PDF tools in the same directory are the next step.

How to use the Base64 to PDF

  1. 1 Paste the Base64 string, or a complete `data:application/pdf;base64,` URI.
  2. 2 Press Decode. The tool verifies the result begins with the `%PDF` signature before offering it.
  3. 3 Check the page count and file size shown once decoding succeeds.
  4. 4 Download the PDF, or open it in a new tab to read it first.

Where Base64 PDFs come from

The most common source is an API that returns a document rather than a file. Systems that pass PDFs through JSON, or through a field that must remain text, encode the bytes so the payload survives transport intact. Accounting integrations, e-signature services and report generators all do this routinely.

The other source is a saved web page, where a viewer embedded its document as a data URI. Extracting that string and decoding it recovers the original file, which is often the only way to get a copy of something a page would only display.

  • Accepts the bare payload or a full data URI.
  • Validates the `%PDF` header rather than trusting the label.
  • Reports the decoded size so you can spot a truncated string immediately.

What is a Base64 PDF?

Base64 encodes binary file data as plain ASCII text so it can travel inside JSON, HTML or data URLs. Decoding reverses that transformation and restores the original PDF bytes.

Frequently asked questions

Can I tell from a Base64 string whether it is a PDF?

Yes, reliably. The decoded bytes of every valid PDF begin with the ASCII characters `%PDF-` followed by a version number. Because Base64 maps three bytes onto four characters, that signature always appears at the very start of the encoded string as `JVBERi`. If a string starts with those six characters, it holds a PDF.

The string decodes but the file will not open. What is wrong?

In almost every case the string is incomplete. Base64 strings are frequently truncated when copied out of an email, a log viewer or a terminal that wraps long lines. Compare the length against the original: a valid string's length is always a multiple of four, and a short one means characters were lost from the end.

Is a Base64 PDF safe to email?

It is safe in the sense that it will not be mangled, since Base64 uses only characters that survive being pasted into anything. It is not safe in the sense of protected — anyone holding the string can decode it instantly, so the encoding provides no confidentiality at all. Use real encryption if the document is sensitive.

Related Image & Color Tools

Browse all Image & Color Tools →

You might also need

Tools from other categories that people pair with the Base64 to PDF:

Browse the full tool directory →