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)
Decode Base64-encoded JSON objects with charset self-healing, or paste full Postman/REST JSON envelopes to unpack and name every embedded file automatically.
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.
Paste any Base64 string, Data URI, Postman JSON, SOAP XML, HAR, or EML payload on the left.
Load real client-side verified payloads straight into the workbench above. Zero third-party trademarks.
Decode Base64-wrapped JSON tokens cleanly, or paste whole 50,000-line REST JSON envelopes to extract every embedded document without manual text hunting.
Engineers dealing with JSON and Base64 face two opposite headaches daily. First, OAuth state parameters, Pub/Sub messages, and cursor tokens arrive as Base64 strings (typically opening with eyJ for {" ) that decode into compact JSON objects—often encoded with legacy regional charsets or URL-Safe characters.
Second, ERP, customs, and shipping APIs return massive JSON objects hiding multiple Base64 PDFs, Excel workbooks, or PNG labels inside nested keys like response.documents[0].content. Base64Doc detects which input you pasted automatically: decoding eyJ... strings into legible formatted JSON, or walking raw JSON trees to surface every binary attachment in named tabs.
Eliminate JSON \/ escape errors and generic application (1).pdf downloads with intelligent property-name derivation.
Many PHP, Java, and Go JSON serializers escape every forward slash inside Base64 as \/. Standard decoders crash on the very first backslash. Base64Doc normalizes \/ back to /, inspects sibling filename/fileName keys or parent property names, and pairs each extracted file with 66 magic-byte checks.
Bundle all extracted PDFs, spreadsheets, and images from a single API call into one verified .zip download locally.
When debugging multi-document webhooks returning packing slips alongside customs forms, fflate packs every verified attachment into one clean .zip archive directly in browser memory.
Drop either an encoded Base64 string representing JSON (starting with eyJ...) or an entire multi-kilobyte Postman/webhook JSON response.
If input is Base64, Base64Doc decodes and pretty-prints the JSON (recovering EUC-KR/Shift_JIS if needed); if raw JSON, it scans every nested key for embedded Base64 files.
Switch across auto-named attachment tabs (such as waybill_label.pdf or invoice_data.xlsx) derived from sibling fileName fields or JSON keys.
Copy the decoded JSON object, preview extracted PDFs/Excel sheets inline, or download every attachment together in one .zip archive.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| JSON Decode Trigger | eyJ... (7B 22) / W3... (5B) | Handles both Standard (+/) and Base64URL (-_) serialized JSON tokens. |
| JSON Envelope Extraction | Recursive key + fileName walk | Strips JSON \/ escaped forward slashes and literal \r\n automatically. |
| Charset Recovery | UTF-8, EUC-KR, Shift_JIS, GB18030 | Fixes garbled Asian strings inside legacy decoded JSON responses. |
| Multi-File Bundling | Client-side fflate .zip export | Zero server round-trips even when unpacking 5+ API attachments. |
| Privacy Posture | 0 payload bytes transmitted | Safe for OAuth userinfo claims, PII webhooks, and carrier payloads. |
If you paste a Base64 string whose decoded bytes are JSON, it decodes and recovers charsets automatically; if you paste raw JSON, it scans every nested key to unpack embedded binary attachments.
Yes, the sanitizer converts \/ back to / and strips JSON wrapper quotes and literal \r\n escapes cleanly before Base64 decoding runs.
Because JSON objects begin with opening brace and quote characters {" (hex 7B 22), which encode deterministically to eyJ in Base64.
It reads sibling fileName or filename keys when available, or falls back to the enclosing JSON property name paired with the magic-byte-verified extension.
Yes, strict UTF-8 failure automatically triggers regional legacy charset scoring so Korean, Japanese, Chinese, or Cyrillic JSON values render cleanly.
Avoid Chrome data: URI truncation and memory leaks when rendering Base64 PDFs in JavaScript using Uint8Array, Blob URLs, and Web Workers.
Fix binascii.Error Incorrect padding and binary mode corruption when decoding Base64 PDFs, Excel sheets, and images in Python.
Diagnose why base64 -d, atob, or APIs fail with invalid input: data: prefixes, URL-Safe -/_ chars, JSON \/ escapes, whitespace, and missing =.
Understand the +33.3% Base64 expansion math, Data URI overhead, Vercel 4.5MB and AWS 6MB/10MB payload limits, and when to switch to binary uploads.
Eliminate garbled characters (mojibake) when decoding Korean EUC-KR/CP949, Japanese Shift_JIS, Chinese GB18030, or Cyrillic Base64 payloads.
Cross-platform cheat sheet comparing GNU/Linux base64 -d -w0, macOS BSD base64 -D -i/-o, and Windows PowerShell [Convert]::FromBase64String.
Diagnose why decoded Base64 to PDF files open blank, corrupted, or upside down: 2MB Data URI caps, JSON \/ escapes, HTML 502 payloads, and text writes.
Convert Base64 columns in Excel without add-ins using Power Query Binary.FromText, Office Scripts, or VBA MSXML2, and avoid 32,767 cell truncation.