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)
Stream .mp4 or .webm clips through a local Web Worker into RFC 4648 Base64 or HTML5 <video> Data URIs without uploading video to external servers.
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.
Know immediately when a compact UI micro-clip fits safely inline vs when a multi-megabyte MP4 must move to CDN range streaming or R2 pre-signed URLs.
Tiny silent MP4 loops (such as a 10–150 KB onboarding demo) occasionally ship inline for single-file offline bundles or isolated Playwright fixtures. Beyond a couple hundred kilobytes, however, Base64’s +33.33% size tax hurts page load and breaks HTTP range seeking.
When encoding video clips for API tests, Base64Doc computes the exact post-expansion byte footprint in real time—warning you in red the moment a 5 MB MP4 balloons to 6.67 MB past Vercel’s 4.5 MB and AWS REST’s 6 MB caps.
Encode 50 MB–100 MB video fixtures locally without stalling browser tabs or filling textareas with tens of millions of characters.
Reading a 60 MB MP4 into an uncontrolled textarea string crashes browser tabs instantly. Base64Doc processes aligned 786,432-byte slices inside a dedicated Web Worker and exposes head/tail excerpts plus streaming .txt Blob downloads.
Assign exact video/mp4 or video/webm MIME headers automatically by inspecting byte offsets 0..12.
Checking the offset-4 ftyp brand box and EBML 1A 45 DF A3 signatures guarantees Data URIs carry valid media declarations without manual configuration.
Select any video clip from disk; File.slice() passes 786 KB aligned chunks to a local Web Worker without uploading video frames.
Base64Doc checks offset 4 for ISO Base Media ftyp atoms (video/mp4) or 1A 45 DF A3 (video/webm) to set exact Data URI headers.
Observe how fast video expands under Base64—a 5 MB MP4 reaches ~6.67 MB, turning both Vercel 4.5 MB and AWS 6 MB indicators red.
Grab an HTML5 <video> Data URI for tiny offline UI loops, or stream-download the full Base64 .txt output cleanly.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| ISO BMFF Atom Offset | Offset 4: 66 74 79 70 (ftyp) | Covers isom, mp42, avc1, and iso2 MP4 brand identifiers. |
| WebM Alternative | 1A 45 DF A3 (EBML / Matroska) | Automatically emits video/webm when VP8/VP9/AV1 WebM files are dropped. |
| Gateway Ceiling Impact | 3.35 MB raw -> 4.47 MB Base64 | Only short micro-clips (< 3.3 MB) clear 4.5 MB JSON API gateways. |
| Worker Chunking | 786,432-byte aligned blocks | Prevents tab crashes via 4,096-char head/tail preview virtualization. |
| Ideal Inline Case | Micro UI demos (< 150 KB) | Production video streaming should always use HTTP Range CDN files. |
Adding +33.33% Base64 overhead expands a 5 MB MP4 to roughly 6.67 MB, exceeding both Vercel’s 4.5 MB and AWS REST API Gateway’s 6 MB request limits.
No, 786 KB Web Worker chunking keeps browser controls responsive and uses 4,096-char head/tail virtualization for multi-megabyte strings.
Inline Data URIs cannot use HTTP 206 partial byte-range streaming, inflate HTML document weight by 33%, and block independent CDN video caching.
Yes, dropping a .webm clip detects the 1A 45 DF A3 EBML header and emits video/webm automatically.
No, every file slice is read and Base64-encoded strictly inside local browser memory.
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.