Convert base64 to a PDF file
Developers and email systems often ship PDFs as long base64 strings — sometimes wrapped in a data:application/pdf;base64, prefix. base64app decodes that string, confirms the bytes start with a real PDF header (%PDF), previews the document, and lets you save filename.pdf.
Nothing is uploaded. Decoding happens entirely on your device.
Works with messy or corrupted base64
Copied from Slack, email, or a JSON API? base64app strips line breaks, fixes padding, converts URL-safe characters, and removes stray characters before decoding.
- data:application/pdf;base64, prefixes
- Line breaks and spaces in the middle of the string
- URL-safe base64 (- and _)
- Missing = padding at the end
How it works
- 1. Paste your base64 PDF string into the decoder above (a full data: URI is fine).
- 2. Leave auto-repair on if the string came from email, chat, or logs.
- 3. Click Decode — base64app detects PDF, shows a preview, and offers Download.
Common errors
- Invalid characters — standard base64 only uses A–Z, a–z, 0–9, +, /, and = padding.
- Missing or wrong padding — length should be a multiple of 4; add = at the end if needed.
- Line breaks and spaces — email, Slack, and JSON often insert whitespace that must be stripped.
- data: URI prefix left on the string — remove data:<mime>;base64, before decoding.
- URL-safe alphabet — JWTs and some APIs use - and _ instead of + and /.
- Truncated payload — a copied string cut off mid-way cannot be fully recovered.
- Wrong MIME in data URI — ensure the prefix says application/pdf if you expect a PDF.
- Decoded bytes are not PDF — the string may encode an image or other file type instead.
Frequently asked questions
How do I convert base64 to PDF?
Paste the base64 string and click Decode. When the content is a PDF, you get an inline preview and a download button with the .pdf extension.
Does it support data:application/pdf;base64 URIs?
Yes. Paste the entire data URI — base64app removes the prefix and decodes the payload automatically.
Why does my base64 not open as a PDF?
The string may be truncated, corrupted, or may encode a different file type. Enable auto-repair and check the detected type after decoding.
Can I preview the PDF before downloading?
Yes. base64app renders an inline PDF preview in the browser when decoding succeeds.
Is my data uploaded when I decode?
No. All processing runs in your browser. Nothing is uploaded, stored, or logged.
Can base64app fix corrupted base64?
Yes. Auto-repair fixes whitespace, data URI prefixes, URL-safe characters, padding, and stray characters.
Is base64app free?
Yes — free with no sign-up required.
