Decode a Base64 string to a downloadable PDF file. Handles raw Base64 and data URIs. No server upload, runs entirely in your browser.
Paste a Base64 encoded PDF string to decode and download it as a PDF file. This tool accepts both raw Base64 strings (starting with JVBERi) and full data URIs (data:application/pdf;base64,...). The conversion is instant and runs entirely in your browser.
Document generation APIs (invoice generators, contract platforms, reporting services) frequently return PDFs as Base64 strings in JSON responses:
{
"status": "success",
"document": "JVBERi0xLjQKMSAwIG9iago...",
"filename": "invoice-2024-001.pdf"
}
Raw email source shows PDF attachments as Base64 encoded blocks between MIME boundaries:
Content-Type: application/pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="report.pdf"
JVBERi0xLjQKMSAwIG9iago8PAovVHlwZS...
Applications that store documents in text columns (common in early stage products or prototypes) encode PDFs as Base64 strings. Extracting the document requires decoding.
CI/CD pipelines, infrastructure as code tools, and Kubernetes secrets sometimes store PDF certificates or license files as Base64 encoded values in configuration files.
Every PDF file begins with the magic bytes %PDF (hex 25 50 44 46), followed by a version number like 1.4, 1.7, or 2.0. In Base64, these bytes encode to JVBERi. This tool uses this signature to automatically identify PDF content, even without a data URI prefix.
function base64ToPdfBlob(base64) {
const binary = atob(base64);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return new Blob([bytes], { type: 'application/pdf' });
}
const blob = base64ToPdfBlob(base64String);
const url = URL.createObjectURL(blob);
window.open(url);
import base64
base64_string = "JVBERi0xLjQK..."
pdf_bytes = base64.b64decode(base64_string)
with open("output.pdf", "wb") as f:
f.write(pdf_bytes)
echo "JVBERi0xLjQK..." | base64 -d > output.pdf
Browsers can render PDFs from data URIs in iframe and embed elements:
<iframe
src="data:application/pdf;base64,JVBERi0xLjQK..."
width="100%"
height="600px"
></iframe>
This works in Chrome, Edge, and Firefox with their built in PDF viewers. Safari may prompt a download instead. For production applications, dedicated PDF viewers (pdf.js) handle edge cases better than data URI embedding.
Browser based Base64 decoding works reliably up to tens of megabytes. Practical considerations:
This tool sets a 50 MB limit to prevent out of memory errors. For very large PDFs, use command line tools or server side processing.
PDFs can contain JavaScript, form submission actions, external links, and embedded files. Base64 decoding does not sanitize the content. You get the exact original file. If the Base64 comes from an untrusted source, open the decoded PDF in a sandboxed viewer or scan it before processing.
For the reverse operation, see PDF to Base64. For general file decoding, use Base64 to File. For text encoding, the main Base64 Encoder handles that.
Nothing you paste leaves this tab. Every tool runs entirely in your browser — no upload, no server, no account.