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 true PNG IHDR dimensions, reveal transparent icons on a checkerboard canvas, repair broken Data URI headers, and export lossless .png assets.
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.
Catch line-ending mangling and mislabeled JPEG bytes immediately instead of downloading corrupted PNG files that fail downstream pipelines.
The PNG specification intentionally opens with an eight-byte header—89 50 4E 47 0D 0A 1A 0A—designed to detect transmission flaws. Byte 0x89 catches 7-bit ASCII stripping, while 0D 0A and 0A detect automated CRLF/LF text rewrites. In valid Base64, those leading bytes always appear as iVBORw0KGgo.
Developers frequently paste strings prefixed with data:image/png;base64, that actually start with /9j/ (JPEG) or UklGR (WebP). Base64Doc inspects the raw decoded bytes rather than trusting the prefix, warning you immediately and repairing the MIME header.
Inspect transparent PNG signatures, badges, and white UI assets on a crisp checkerboard or dark canvas right in your browser.
Electronic signature APIs and icon builders commonly return black-on-transparent or white-on-transparent PNG glyphs. Viewing a white glyph inside a standard white preview panel hides the entire graphic, leading engineers to suspect decoding bugs.
Switching the Base64Doc canvas to Checkerboard or Dark mode renders transparent regions cleanly so you can confirm crisp glyph outlines and clean bounding boxes in seconds.
Convert decoded vector SVGs or WebP payloads into lossless .png files locally whenever legacy software refuses modern image formats.
If an upstream service delivered a WebP or SVG inside a Base64 field where an older thermal printer or CMS requires PNG, Base64Doc alerts you to the true source signature and converts it locally via browser canvas into a valid lossless .png.
Drop a raw string starting with iVBORw0KGgo or a wrapped data:image/png;base64 payload; whitespace and JSON escapes are cleaned automatically.
The binary inspector checks all 8 PNG signature bytes (catching 7-bit or CRLF corruption) and extracts real width and height from the IHDR chunk.
Toggle Checkerboard or Dark mode to verify clean transparent edges on white icons, watermarks, or QR stickers.
Download the verified .png file directly, or click Save .png to rasterize cleanly if the source bytes turned out to be WebP, JPEG, or SVG.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| 8-Byte PNG Magic Header | 89 50 4E 47 0D 0A 1A 0A | Encodes to iVBORw0KGgo in Base64; detects line-ending corruption instantly. |
| IHDR Geometry Chunk | Offsets 16–24 (Big-Endian) | Reads exact pixel width, height, bit depth, and color type (6 = RGBA). |
| Extension Conflict Guard | Detects JPEG/WebP/SVG masquerading | Blocks blind .png download when payload actually holds FF D8 FF JPEG bytes. |
| Alpha Preview Canvas | Checkerboard / Dark / Light | Verifies transparent fringes without launching external editors. |
| Client Privacy | 0 network image uploads | Decodes QR codes, receipts, and signature PNGs strictly in browser RAM. |
It checks all 8 decoded header bytes for 89 50 4E 47 0D 0A 1A 0A (iVBORw0KGgo in Base64) and parses the IHDR chunk to read real pixel width and height.
Encoding the first eight mandatory PNG header bytes (89 50 4E 47 0D 0A 1A 0A) into 6-bit Base64 groups deterministically yields the characters iVBORw0KGgo.
Yes, Base64Doc warns you about the true incoming format first to prevent corruption, then provides a Save .png action powered by local browser canvas rendering.
Inspect the IHDR color-type byte (value 6 indicates 8-bit RGBA with alpha) or click Checkerboard Canvas above the preview. Transparent background pixels expose the grey-and-white grid immediately.
Invalid length % 4 === 1 strings fail validation immediately, and incomplete IHDR/IDAT payloads trigger clear browser decode diagnostics rather than silent blank downloads.
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.