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)
Verify genuine Word OOXML packages inside PK\x03\x04 archives, inspect internal document XML parts, and block misnamed PDF or Excel saves.
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.
Verify wordprocessingml manifests inside PK\x03\x04 archives so every decoded contract saves cleanly as .docx rather than a generic .zip or broken .txt.
Generic magic-byte scanners stop reading after the first four bytes (50 4B 03 04) and label every Office Open XML payload as a standard ZIP archive. Even worse, converters without archive inspection happily save a PDF invoice or HTML error body with a .docx filename if the user visits a Word-specific URL.
Base64Doc pairs 66 binary signatures with fflate archive traversal inside your browser. Upon detecting PK\x03\x04, it reads [Content_Types].xml and checks for wordprocessingml.document or word/document.xml, separating .docx cleanly from .xlsx, .pptx, .epub, and plain .zip.
Legacy document APIs occasionally emit older OLE2 .doc binaries (D0 CF 11 E0) or plain RTF markup ({\rtf1) under a .docx label. Catching those signatures upfront prevents corrupted Word recovery prompts.
Audit internal package parts and oversized embedded images right inside the browser without executing macros or uploading confidential agreements.
Before opening an untrusted contract or generated mail-merge file in desktop Word, engineers often want to inspect which XML parts or embedded assets exist inside the container. Base64Doc displays the internal OOXML directory tree with uncompressed byte counts for every file.
Spot instantly whether a 9 MB .docx owes its bloat to an uncompressed BMP stamp inside word/media/image1.png or whether a template placeholder failed to populate inside word/document.xml—all without any file bytes leaving your workstation.
Unpack Base64 .docx attachments nested inside REST webhooks or .eml messages without manual substring slicing.
Document automation and e-signature APIs frequently return completed .docx agreements alongside audit-trail PDFs inside a single JSON payload. Simply paste the entire API response into the studio; Base64Doc isolates every attachment tab and labels each file from its outer JSON key.
Drop a raw Base64 string, Data URI, or contract-management JSON response into the input field; escaped slashes and wrapper quotes are stripped cleanly.
Base64Doc decompresses the PK\x03\x04 ZIP directory locally via fflate to confirm wordprocessingml.document in [Content_Types].xml and word/document.xml presence.
Review embedded word/media/* images, headers, or footers inside the archive inspector tree to spot oversized signatures or broken template assets before opening Word.
Download the confirmed .docx file, or follow the mismatch alert if the payload actually carries a legacy .doc, RTF, or PDF stream.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| OOXML Signature | 50 4B 03 04 + word/document.xml | Distinguishes Word contracts from .xlsx sheets and .pptx decks. |
| Legacy Binary Word | D0 CF 11 E0 A1 B1 1A E1 (.doc) | Alerts when an older OLE2 compound document arrives instead of .docx. |
| Rich Text Detection | 7B 5C 72 74 66 31 ({\rtf1) | Catches mislabeled RTF outputs returned by legacy ERP document generators. |
| Verified Word MIME | application/...wordprocessingml.document | Auto-repairs generic application/zip or octet-stream Data URIs. |
| Embedded Asset Audit | word/media/* byte sizes | Lists internal XML parts and embedded images without running macros. |
Every .docx file opens with the 4-byte ZIP local header 50 4B 03 04 (PK\x03\x04). Base64Doc inspects [Content_Types].xml and word/document.xml inside the package locally to distinguish genuine Word documents from plain ZIPs.
Base64Doc detects the D0 CF 11 E0 OLE2 signature, alerts you that the payload is legacy .doc rather than OOXML .docx, and recommends saving with the safe .doc extension.
Yes, it checks for 7B 5C 72 74 66 ({\rtf) at byte offset 0 and warns you immediately if an API sent Rich Text instead of an OOXML package.
Yes, the built-in archive inspector lists word/document.xml, styles.xml, and word/media/* assets with byte sizes and allows single-part extraction.
No, decoding, fflate XML inspection, and file creation run 100% inside local browser memory with zero outbound requests.
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.