Developer

Encoders, converters & dev utilities

12 tools
Developer · Base64 Converter

Base64 to PDF — Decode & Download In-Browser

Paste a Base64 string that encodes a PDF and this tool decodes it back to the original bytes, previews it inline, and lets you download it as a proper application/pdf file. Base64 (RFC 4648) is how binaries like PDFs travel inside JSON, data URIs, and email — every 3 bytes become 4 ASCII characters, so the encoded text is always larger than the file. A quick tell that your string really is a PDF: the bytes of the header "%PDF-" (25 50 44 46 2D in hex) Base64-encode to the prefix JVBERi0, so a valid PDF payload almost always starts JVBERi0. Decoding runs 100% in your browser via atob/Uint8Array + a Blob object URL, so your document never leaves the page (check the network tab). Free, no login.

Quick answer

Decode = Base64 → raw bytes → Blob with MIME application/pdf → inline preview + download (RFC 4648)

  • Byte-exact tell: the PDF header "%PDF-" = bytes 25 50 44 46 2D → Base64 "JVBERi0" (most PDF payloads start JVBERi0)
  • Base64 inflates size: every 3 bytes → 4 chars, so the encoded string is ~33% larger than the file
  • Runs 100% client-side (atob + Uint8Array + Blob URL) — your document is never uploaded
  • Encoding is not encryption: anyone can decode Base64, so it hides nothing — it only transports bytes
Open the full Base64 Converter

Frequently asked questions

How do I convert a Base64 string to a PDF?

Paste the Base64 text into the tool and it decodes the characters back into the original file bytes, wraps them in a Blob tagged application/pdf, and gives you an inline preview plus a download button. No server is involved — the decode happens in your browser with atob and a Uint8Array. If your string is a data URI it may begin data:application/pdf;base64, — strip that prefix (or let the tool strip it) so only the Base64 payload is decoded.

How can I tell my Base64 actually contains a PDF?

Look at the first characters. A PDF file always starts with the ASCII header %PDF- (hex 25 50 44 46 2D). Those five bytes Base64-encode to JVBERi0, so a genuine PDF payload almost always begins JVBERi0. If your string starts with something else (for example iVBORw0KGgo, which is a PNG), it is not a PDF and decoding it as one will produce an invalid file.

Is my PDF uploaded anywhere when I decode it?

No. The entire decode is client-side JavaScript: the Base64 is turned into bytes with atob/Uint8Array and rendered from a local Blob object URL, so the document never touches a server. You can confirm this by watching the network tab — there is no request carrying your data. That is the privacy point of a client-side tool; remember, though, that Base64 itself is not encryption and provides no confidentiality.

Related Base64 Converter pages