Base64 to PDF: Decode PDF Data and Encode Files

Decode Base64, Base64url, or a data:application/pdf;base64 URL into the original bytes, then check the PDF header, trailer, and cross-reference. Download the PDF, or encode a local PDF back to Base64. The text preview only reads uncompressed text operators.

Paste standard Base64, Base64url, or a data:application/pdf;base64 URL. Line breaks are ignored. Press Decode, or wait for a short input to update.

Paste Base64, or load the sample.

How this check works

  • Decoding and encoding stay in this browser. Nothing is uploaded, and earlier inputs are not kept after you clear them.
  • Standard Base64 and Base64url are accepted, with or without = padding. Spaces and line breaks are ignored. Any other character is an error. A data URL must include ;base64, before the payload. The usual PDF form is data:application/pdf;base64, followed by the alphabet.
  • The bytes look like a PDF when a %PDF- version header sits in the first 1024 bytes and %%EOF sits in the last 1024 bytes, and startxref lands on a cross-reference table or cross-reference stream. This is a structural screen, not a full PDF validator, and it does not repair files.
  • The preview reads literal and hexadecimal strings used by the text operators Tj, TJ, apostrophe, and quote, and only inside streams that have no filter. ASCII, Windows-1252, and UTF-16BE with a byte-order mark are shown. Font encodings, ToUnicode maps, and glyph positions are not applied. This is not a page render, and there are no thumbnails.
  • If the last trailer contains /Encrypt, or a stream uses /Crypt, the tool says text cannot be extracted. Compressed filters such as FlateDecode are named and are not inflated.
  • Download writes the decoded bytes unchanged. Inputs that decode to more than 8 MB are rejected. The page-object count only includes uncompressed /Type /Page dictionaries, so an incremental update can be counted more than once.