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)
Drop local .xlsx or .csv workbooks to generate clean Base64 or Data URI strings, verify gateway payload budgets, and export ready-to-run JavaScript, Python, or Go code.
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.
Drop any local file up to 100MB+ or type UTF-8 text on the left. No data leaves your browser.
Load real client-side verified payloads straight into the workbench above. Zero third-party trademarks.
Automatically distinguish modern OOXML workbooks, legacy BIFF8 spreadsheets, and plain CSV exports without guessing obscure MIME strings.
Spreadsheet integrations routinely break because a developer hardcodes application/vnd.ms-excel onto a modern .xlsx archive or sends application/octet-stream for a plain CSV export. Downstream SaaS parsers use the Data URI or JSON contentType metadata to pick the right reader before touching disk.
When you drop a spreadsheet into Base64Doc, the detector verifies whether the file starts with 50 4B 03 04 plus spreadsheetml XML (assigning the full OpenXML sheet MIME), D0 CF 11 E0 (legacy .xls), or delimited UTF-8 text (text/csv).
Verbatim byte encoding ensures leading UTF-8 BOM bytes (EF BB BF) inside localized CSV files remain intact so recipient spreadsheets keep Korean, Japanese, or European diacritics intact.
Understand when pre-compressing a spreadsheet rescues an API payload limit and when a workbook must move to direct binary upload.
A 10 MB uncompressed CSV ledger encodes to ~13.3 MB in Base64, failing Vercel and AWS gateway caps outright. Because plain CSV text repeats dates, SKU prefixes, and currency strings, compressing it to .zip or .xlsx typically slashes raw size by 75% before Base64’s +33.33% expansion applies.
By contrast, .xlsx files are already ZIP archives containing Deflate-compressed XML sheets. Running Gzip again on an .xlsx yields under 2% savings while adding decompression complexity on the receiver. When an .xlsx already exceeds 3.35 MB raw, splitting worksheets or switching to pre-signed cloud upload is the cleanest engineering fix.
Keep payroll sheets, vendor quotes, and invoice ledgers inside local browser memory while exporting copy-ready API test payloads.
Accounting teams and backend developers testing webhook importers cannot paste live revenue sheets into ad-laden web utilities that post files to remote servers. Everything here executes strictly inside your local Web Worker—verifiable offline after page load.
Once encoded, switch directly to the JSON Payload wrapper or copy verified Python, Node.js, C#, Go, or PowerShell blocks to replay the exact request against staging endpoints.
Drop a spreadsheet file into the local workbench; Base64Doc inspects its magic bytes to assign the exact spreadsheetml, ms-excel, or text/csv MIME header.
Keep raw single-line RFC 4648 output for ERP REST bodies, switch to RFC 2045 MIME-76 for email parts, or enable Data URI mode for self-contained HTML fixtures.
Verify whether the +33.33% Base64 expansion stays green beneath Vercel 4.5 MB or AWS 6 MB limits; for massive .csv exports, consider zipping before encoding.
Grab a wrapped JSON integration object or copy Python, JavaScript, C#, Go, or PowerShell code ready for your ETL or webhook test suite.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| Modern XLSX MIME | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Applied automatically when PK\x03\x04 contains spreadsheetml manifests. |
| Legacy XLS & CSV MIME | application/vnd.ms-excel | text/csv | Assigned via D0 CF 11 E0 signature or UTF-8 delimiter heuristics. |
| Pre-Compression Behavior | .xlsx already Deflate-zipped | Extra Gzip saves < 2% on .xlsx, whereas raw .csv shrinks 70%–85% when zipped. |
| UTF-8 BOM Handling | Verbatim EF BB BF preserved | File bytes encode untouched so Excel desktop preserves non-ASCII CSV columns. |
| Security Posture | Zero-upload Web Worker | Payroll, ledger, and SKU margins never cross the public internet. |
Assign the official IANA MIME type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for .xlsx, application/vnd.ms-excel for legacy D0 CF 11 E0 .xls, and text/csv for CSV. Base64Doc detects the file signature and populates the matching prefix automatically.
No, all byte reading and Base64 chunking run strictly inside local browser memory and a Web Worker. Zero file bytes are sent to any server.
No, .xlsx files already use ZIP Deflate compression internally so Gzip saves under 2%. Only raw .csv files compress dramatically (often 70%–85%) before Base64 encoding.
Yes, local file encoding converts the exact disk byte stream verbatim without stripping BOM headers or altering CRLF line endings.
Yes, aligned 786,432-byte Web Worker chunking handles large spreadsheets smoothly and displays a virtualized head/tail excerpt alongside one-click .txt export.
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.