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)
Full-featured local Base64 to text decoder and binary converter with Live Mode, dirty Data URI sanitization, 66 magic-byte checks, and automatic EUC-KR / Shift_JIS / GB18030 charset healing.
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.
Eliminate unreadable replacement diamonds when decoding Base64 text from legacy Korean, Japanese, Chinese, or Cyrillic systems.
Base64 encodes raw 8-bit octets—not character encodings. When older Korean settlement systems (EUC-KR / CP949), Japanese shipping terminals (Shift_JIS), Chinese banking gateways (GB18030 / Big5), or Eastern European servers (Windows-1251) encode non-UTF-8 strings into Base64, conventional decoders hardcode non-fatal UTF-8 and flood the screen with U+FFFD replacement diamonds.
Base64Doc validates every text buffer with TextDecoder("utf-8", { fatal: true }) first. The moment fatal validation catches an illegal UTF-8 sequence, the charset engine scores regional legacy codepages via WHATWG TextDecoder and renders legible Hangul, Kana, Hanzi, or Cyrillic immediately—even offering a diff toggle against broken UTF-8.
Switch effortlessly between decoding short debug strings in Live Mode and unpacking multi-megabyte PDFs or spreadsheets.
Unlike bare text-only utilities that vomit thousands of random %PDF- symbols into an output textarea when you paste a document string, Base64Doc checks 66 binary signatures on decoded bytes first and opens the matching PDF, Excel, Image, or ZIP preview automatically.
Clean pasted quotes, Data URI prefixes, and escaped slashes while pinning exact error coordinates on genuinely broken strings.
Combined with debounced Live Mode and 1-click legacy encoding override selectors, engineers have a single local decoder for both everyday text and complex cross-border troubleshooting.
Drop standard or URL-Safe Base64, dirty Data URIs, or JSON logs; Live Mode decodes short snippets automatically while protecting active drafts.
Binary headers (PDF, ZIP, images, audio) trigger instant inline previews; text streams pass through strict fatal UTF-8 validation.
If strict UTF-8 fails, Base64Doc scores EUC-KR/CP949, Shift_JIS, GB18030, Big5, and Windows-1251 candidates automatically and lets you compare or switch with one click.
Grab recovered UTF-8 text or save verified binary files directly from browser memory.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| Legacy Charset Sniffing | EUC-KR, Shift_JIS, GB18030, Big5, Win-1251 | Triggered automatically whenever TextDecoder("utf-8", { fatal: true }) throws. |
| Live Mode Threshold | Debounced on interactive text | Large multi-megabyte inputs switch smoothly to async 1 MiB Worker chunks. |
| Alphabet & Wrapper Cleaning | Standard, URL-Safe, Data URI, \/ | Restores omitted = padding and strips outer log formatting automatically. |
| Binary Detection | 66 Signatures + OOXML | Never dumps raw PDF or PNG bytes as unreadable ASCII text. |
| Privacy Posture | 0 server text uploads | Decoded customer notes, emails, and tokens stay strictly in browser RAM. |
When decoded bytes fail strict fatal UTF-8 validation, Base64Doc scores EUC-KR/CP949, Shift_JIS, GB18030, Big5, and Windows-1251 automatically and recovers the readable text in one click.
Yes, Live Mode uses debounced execution for interactive text inputs, while multi-megabyte payloads process asynchronously inside a Web Worker with virtualized head/tail output.
They pass raw bytes into non-fatal UTF-8 decoding, which replaces every unmatched legacy multi-byte Hangul sequence with U+FFFD diamonds.
Yes, use the Charset selector bar above the decoded text result to switch between UTF-8, EUC-KR, Shift_JIS, GB18030, Big5, and Windows-1251 at any time.
Base64Doc detects the binary magic bytes automatically and switches to the visual PDF or image preview rather than displaying binary gibberish as text.
Base64Doc decodes raw octets through fatal UTF-8 TextDecoder validation first and falls back to EUC-KR, Shift_JIS, GB18030, Big5, or Windows-1251 automatically so converted plain text never shows replacement diamonds.
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.