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)
Encode high-resolution .jpg and .jpeg photos without server uploads, downscale width before encoding, and inspect +33.3% payload expansion.
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.
Preserve original JPEG bytes and EXIF tags by default, or toggle browser resizing to bake orientation and strip GPS metadata while slashing size.
When writing automated tests against image-forensics APIs or archiving receipt scans, altering JPEG quantization tables or stripping EXIF timestamps invalidates checksums. In default mode, Base64Doc reads raw .jpg bytes directly off disk so every encoded octet matches the original file byte-for-byte.
Conversely, mobile camera photos captured for support tickets or KYC forms often measure 4000x3000 pixels and embed multi-kilobyte GPS and lens metadata. Toggling Pre-Encode Slimming re-renders the image onto a capped-width browser canvas—automatically baking EXIF orientation flags upright, stripping privacy-sensitive GPS tags, and cutting byte weight dramatically.
Downscale bulky 4–8 MB smartphone JPEGs before +33.33% Base64 expansion triggers HTTP 413 gateway rejections.
A typical 4 MB smartphone photo balloons to 5.33 MB once Base64-encoded, failing Vercel Serverless Functions (4.5 MB cap) and pushing close to AWS Lambda proxy caps (6 MB). Scaling Max Width to 1280 px or encoding to WebP beforehand usually brings the final Base64 string well under 400 KB.
Encode driver licenses, passport scans, and field inspection photos entirely offline inside a local Web Worker.
Every encoding step executes in local RAM without posting pixels or EXIF metadata to external servers, and outputs ready-to-paste JSON wrappers or cURL/Python/JS code snippets.
Drag any camera photo or product image into the encoder; files stream locally through your browser Web Worker with zero server upload.
Leave slimming off to encode exact disk bytes (preserving EXIF orientation and metadata), or enable Max Width / WebP conversion to shrink 12 MP camera files.
Confirm the +33.33% encoded byte size stays green beneath Vercel 4.5 MB or AWS 6 MB limits before pasting into REST tests.
Grab the canonical image/jpeg Data URI, JSON payload wrapper, or copy-ready Python, JavaScript, Go, or PowerShell code.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| Verbatim Mode Behavior | Preserves EXIF & DCT blocks | No quality loss or metadata stripping unless pre-encode slimming is toggled. |
| Slimming Mode Behavior | Bakes EXIF rotation + strips GPS | Browser canvas re-encoding auto-orients pixels and removes camera EXIF. |
| Camera Payload Math | 3.35 MB JPG -> ~4.47 MB Base64 | Modern 48 MP smartphone photos routinely breach serverless body limits. |
| Canonical Prefix | data:image/jpeg;base64,/9j/... | Always emits standards-compliant image/jpeg rather than image/jpg. |
| Privacy Guarantee | 0 network upload bytes | Sensitive EXIF GPS coordinates and IDs remain strictly on-device. |
Use the Pre-Encode Slimming bar to cap Max Width (such as 1280 px) or convert to WebP before generating the Base64 string, watching the gateway light turn green.
Yes, verbatim mode converts the exact file bytes untouched. Only when you enable Pre-Encode Slimming are pixels redrawn via browser canvas, which bakes orientation and strips EXIF tags.
Official IANA media registration defines image/jpeg as the sole standard MIME type for both .jpg and .jpeg extensions.
No, Base64 is a lossless ASCII transport representation of your exact JPEG bytes; visual quality never changes unless you actively apply canvas resizing.
Yes, switch to the JSON Payload snippet tab or click Copy API JSON Request Body to grab a formatted 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.