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)
Eliminate two-step terminal pipes: paste a Base64 string wrapping 1F 8B Gzip bytes to decompress, format inner JSON/XML, and unpack nested attachments locally.
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.
Turn unreadable Gzip + Base64 log strings straight into formatted JSON or XML without switching to a terminal pipe.
AWS CloudWatch Subscriptions, OpenTelemetry exporters, legacy SOAP/SAML endpoints, and high-throughput ERP webhooks routinely compress JSON before Base64-encoding it. Every normal Base64 decoder stops halfway—dumping raw 1F 8B binary gibberish onto the screen.
Whenever Base64Doc detects RFC 1952 Gzip headers (1F 8B 08, deterministically starting with H4sI in Base64), it automatically triggers a local fflate gunzipSync pass inside the Web Worker and renders the decompressed JSON, XML, or plain text immediately.
Automatically unpack PDFs nested inside gunzipped JSON and repair garbled EUC-KR or Shift_JIS text hidden inside compressed payloads.
Real-world integrations frequently nest formats: a JSON webhook arrives Gzip-compressed and Base64-encoded, and inside the gunzipped JSON sits another Base64-encoded thermal PDF or legacy Korean EUC-KR receipt.
Rather than forcing two manual decode passes, Base64Doc recursively feeds the inflated payload back through its attachment scanner and legacy charset sniffer so both nested documents and international text appear cleanly.
Catch zlib (78 9C) or PKZIP (50 4B 03 04) streams accurately rather than crashing with generic gunzip errors.
If a payload actually uses zlib framing (eJw...) or ZIP containers (UEsDB...) instead of RFC 1952 Gzip, magic-byte inspection flags the exact compression format immediately.
Drop Base64 strings starting with H4sI from CloudWatch, Envoy, SAML, or compressed ERP webhooks—even wrapped inside JSON quotes.
Base64Doc strips wrappers, confirms 1F 8B Gzip magic bytes, and inflates the compressed stream in memory via fflate gunzipSync.
View formatted inner JSON/XML, unpack any secondary Base64 PDF/Excel attachments inside the gunzipped response, or heal legacy EUC-KR text.
Copy the legible JSON/text payload or download extracted files directly from browser memory.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| Gzip Header Signature | 1F 8B 08 (Base64: H4sI...) | RFC 1952 ID1=0x1F, ID2=0x8B, CM=0x08 (Deflate compression). |
| Two-Stage Pipeline | Base64 -> fflate gunzipSync | Replaces `base64 -d | gunzip` terminal chains inside browser RAM. |
| Recursive Extraction | Scans gunzipped JSON/XML | Pulls nested PDF or spreadsheet Base64 payloads out of inflated logs. |
| Legacy Charset Healing | UTF-8 -> EUC-KR / Shift_JIS | Recovers non-UTF-8 Asian/Cyrillic text hidden inside compressed streams. |
| Upload Exposure | Zero server gunzip calls | Safe for production trace payloads and SAML assertions. |
Base64Doc recursively scans decompressed JSON or XML for nested Base64 attachments and applies fatal UTF-8 plus EUC-KR/Shift_JIS charset sniffing automatically.
No, fflate executes gunzipSync strictly inside your browser Web Worker with zero network calls or payload retention.
RFC 1952 Gzip streams begin with magic bytes 1F 8B and compression method 08 (Deflate), which encode to the four Base64 characters H4sI.
Strings beginning with eJw (78 9C) use raw zlib deflate framing rather than Gzip 1F 8B headers, so standard gunzip rejects them without a zlib header wrapper.
Yes, Base64Doc lets you download the decoded .gz binary directly or copy and save the inflated JSON/text payload.
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.