Base64Doc

Base64 to PDF Converter

100% Browser Local · 0 File Uploads · 100MB+ Ready

Paste a Base64 string or full shipping API JSON response. Runs 100% locally in your browser with instant PDF preview, 90/180 deg rotation, page splitting, and clipboard PNG copy.

Try 1-Click Synthetic Samples (Zero-Trademark):

Drop any file, paste Base64, or press Ctrl/Cmd+V with clipboard files or raw API JSON

Runs inside a local Web Worker. Network tab stays at 0 file POST requests.

0 chars
Decoded Result & Document Actions Appear Here

Paste any Base64 string, Data URI, Postman JSON, SOAP XML, HAR, or EML payload on the left.

Interactive Synthetic Showcase Gallery

Load real client-side verified payloads straight into the workbench above. Zero third-party trademarks.

Free · InstantCASE-1

Shipping API JSON -> 2 Auto-Named PDFs + 180 deg Label Fix

Input Payload
Raw Shipping API JSON (4.8 KB)
Verified Output
waybill_label.pdf (4x6 in, 180 deg -> 0 deg) + commercial_invoice.pdf (A4, 2 pages)
Real browser-decoded output preview (client-side only)
Free · InstantCASE-2

ERP Payload -> PK\x03\x04 Verified 3-Sheet Excel Preview

Input Payload
ERP Base64 Payload (122.8 KB)
Verified Output
Summary (128 rows x 11 cols), LineItems (48 rows), Tax (24 rows) -> .xlsx / .csv / .json
Real browser-decoded output preview (client-side only)
Free · InstantCASE-3

Broken Data URI + MIME Fix + White Transparent Logo

Input Payload
Broken data:image/jpeg;base64 + \/ + newlines (4.9 KB)
Verified Output
Auto-fixed to image/png (512x512 px) + Checkerboard reveals white emblem
Real browser-decoded output preview (client-side only)
Free · InstantCASE-4

Gzip + Base64 Unpack & Korean EUC-KR Mojibake Self-Heal

Input Payload
Gzipped Base64 (212 chars) + EUC-KR Receipt
Verified Output
Gunzipped JSON + EUC-KR Hangul receipt recovered from UTF-8 replacement chars
Real browser-decoded output preview (client-side only)
Free · InstantCASE-5

40-Page Contract Slimming + Gateway Green-Light Check

Input Payload
40-Page Synthetic Contract PDF (33.7 KB)
Verified Output
Extract Page 1 -> +33.3% Base64 fits comfortably under 4.5 MB Vercel limit
Real browser-decoded output preview (client-side only)

Why Blob URL PDF Rendering Beats Inline Data URIs and Server Uploads

Keep confidential invoices and thermal shipping labels strictly inside browser memory while avoiding the blank-iframe bug common above 2 MB.

Read full technical details

Logistics platforms, customs brokers, and billing microservices routinely return Base64-encoded PDFs inside JSON responses. Sending those payloads to a remote conversion server exposes customer addresses, tax IDs, and pricing terms to third-party logs or 24-hour retention buckets. Running quartet decoding inside a browser Web Worker keeps every octet local, verifiable by opening Network DevTools and observing zero outbound POST requests.

Developers who wire Base64 strings directly into an iframe or embed tag using data:application/pdf;base64 often see multi-page contracts vanish into a solid white rectangle. Chromium and WebKit enforce strict URL character ceilings around 2 MB; converting decoded Uint8Array bytes into a Blob and mounting URL.createObjectURL sidesteps the URL parser entirely so 50-page statements render crisply.

Each generated object URL is tracked in an explicit disposal registry. Switching attachments or pasting a fresh webhook response immediately calls URL.revokeObjectURL on superseded buffers, preventing long-lived support consoles from accumulating leaked PDF memory.

API Envelope Unpacking Without Manual Quote Hunting

Paste raw Postman, HAR, or SOAP responses directly to split every embedded PDF into cleanly named tabs ready for instant review.

Read full technical details

Carrier fulfillment endpoints rarely return a lone PDF string; they pack a 4x6 parcel label beside a commercial invoice and hazardous goods form inside deeply nested JSON objects or XML tags, frequently escaping forward slashes as \/ or appending \r\n escapes. Manually slicing out one substring per file wastes minutes on every support ticket.

Base64Doc walks the parsed JSON tree, XML elements, HAR response bodies, and MIME email parts recursively, testing every Base64 candidate against binary file signatures. When a sibling fileName or attachmentName field exists, the tab adopts it verbatim; otherwise, the outer JSON key name becomes the base filename, ending generic application (1).pdf clutter.

When an API response bundles three documents at once, you can preview each PDF individually in the top tab strip or export every extracted document together in one locally built .zip archive.

Post-Decode Thermal Label Rotation, Splitting & Clipboard Snapshots

Fix upside-down 180-degree shipping labels, extract pages 1-2 from long contracts, and paste PNG screenshots straight into issue trackers.

Read full technical details

Warehouse printers often expect portrait 288x432 pt PDFs while upstream dispatch APIs deliver landscape or inverted 180-degree pages. Base64Doc reads each page’s real /MediaBox and /CropBox coordinates and increments /Rotate modulo 360 using pdf-lib, preserving crisp vector barcodes and fonts without lossy re-encoding.

For 40-page supplier agreements where accounting only needs the signature sheet, the page-range splitter builds a clean subset PDF in milliseconds. If a document carries encryption dictionaries or AcroForm signatures, status badges surface those flags before you print or forward the file.

Need to attach page one inside an engineering ticket or team chat? Clicking Copy Page as PNG renders the active canvas through pdfjs-dist and writes a crisp raster image straight to the system clipboard.

Step-by-Step Local Workflow

STEP 1

Paste PDF Base64 or Full API Envelope

Drop a raw string, a data:application/pdf;base64 URI, or an entire multi-kilobyte carrier JSON/XML response directly into the input area without manually stripping quotes or escaped slashes.

STEP 2

Inspect %PDF- Header & Multi-Attachment Tabs

The worker scans for 25 50 44 46 2D (%PDF-1.x) headers, separates every nested document inside your response into named tabs using sibling fileName keys, and blocks corrupted payloads before download.

STEP 3

Rotate 90/180 Deg, Split Pages, or Copy PNG

Adjust upside-down 4x6 thermal labels by updating /Rotate modulo 360 against each page’s real /MediaBox dimensions, extract a subset such as pages 1-2, or copy a high-DPI raster snapshot straight to your clipboard.

STEP 4

Save Verified PDF or Bundle All Tabs

Download the corrected document via an ephemeral local Blob URL that revokes on cleanup, or bundle multiple extracted PDFs from one API call into a single .zip package.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
PDF Header Signature25 50 44 46 2D (%PDF-1.0..2.0)Validates leading magic bytes plus trailer %%EOF markers before rendering.
Page Box Geometry/MediaBox & /CropBox (72 pt/in)Detects 4x6 in (288x432 pt), A4 (595x842 pt), and US Letter (612x792 pt) sizes.
Rotation Math(/Rotate + delta) mod 360Applied locally via pdf-lib without re-rasterizing vector text or barcodes.
Iframe Bypass StrategyUint8Array -> Blob URLAvoids Chromium ~2 MB data:application/pdf URI truncation blank-page bugs.
Envelope Auto-UnpackingJSON, SOAP XML, HAR, EMLNames outputs from outer property keys (e.g., waybill_label.pdf) automatically.

Frequently Asked Questions

Can I paste an entire shipping or invoice API JSON response instead of isolating the Base64 field?

Yes, Base64Doc parses nested JSON, SOAP XML, HAR, and EML envelopes automatically and opens separate named tabs for each embedded PDF. Filenames come from sibling fileName attributes or the enclosing JSON key such as waybill_label.pdf.

Does rotating an upside-down 4x6 shipping label upload my document or crop the page?

No, rotation runs entirely inside your browser via pdf-lib with zero network traffic. It inspects each page’s true /CropBox and /MediaBox bounds and updates /Rotate modulo 360 so 288x432 pt thermal proportions stay exact.

Why do multi-page Base64 PDFs render as blank white frames on naive viewer pages?

Chromium truncates inline data:application/pdf;base64 URIs once payloads cross roughly 2 MB. Base64Doc decodes raw octets into a Blob URL and renders pages via pdfjs-dist so large statements display reliably.

How does the converter detect when an API actually returned HTML or a ZIP instead of a PDF?

It requires the leading 25 50 44 46 2D (%PDF-) signature before enabling PDF download. If an upstream gateway returned a 502 HTML body or PK\x03\x04 archive, the extension guard blocks blind .pdf saving and reveals the true format.

Can I extract just pages 1-2 from a 30-page Base64 PDF without desktop software?

Yes, enter a page range such as 1-2,5 in the PDF action bar to build and save a trimmed local PDF while keeping the original vector text intact.

Explore All 34 Base64 Converters & Developer Tools