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)
Paste URL-Safe Base64URL tokens (- and _ without =) or three-part JWT segments to decode UTF-8 JSON or binary payloads locally without Invalid input errors.
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.
Decode unpadded RFC 4648 §5 Base64URL tokens containing - and _ cleanly instead of hitting InvalidCharacterError in atob() or base64 -d.
Standard Base64 uses + and /, which carry reserved meanings inside URLs and file paths, and appends = padding that breaks unquoted query parameters. RFC 4648 Section 5 defines Base64URL: replacing + with hyphen (-), / with underscore (_), and dropping trailing = signs.
Because native JavaScript window.atob(), GNU base64 -d, and strict Python b64decode reject - and _ or non-multiple-of-4 lengths, engineers waste time running manual string replacements on every JWT payload or WebAuthn challenge.
Inspect live JWT claims, PKCE verifiers, and passkey clientDataJSON strictly inside browser memory without sending bearer tokens to external sites.
Pasting a live OAuth access token or session cookie into a server-backed web decoder risks credential harvesting. Base64Doc processes every character in local RAM, keeps inputs masked with data-clarity-mask="true", and strips query strings before optional analytics ever fire.
Read decoded UTF-8 JSON headers and payloads in plain text, or inspect raw binary signature segments in the Hex + ASCII viewer.
While JWT headers and claims decode to UTF-8 JSON, the third signature segment and JWK key coordinates are raw binary buffers. Decoding directly into the Hex inspector reveals exact byte lengths (such as 32-byte HS256 or 64-byte ES256 signatures) immediately.
Drop URL-Safe query values, JWT header/payload segments, WebAuthn clientDataJSON, or JWK keys containing - and _.
The decoder maps - (0x2D) to + and _ (0x5F) to /, then checks length % 4 (rejecting impossible mod-1 lengths) and restores required = padding.
View readable JSON claims, check raw cryptographic hashes in the Hex + ASCII inspector, or preview embedded binaries.
Copy formatted text or switch modes to inspect exact hex bytes—all with zero network exposure.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| RFC 4648 §5 Substitutions | 62: "-" (for +), 63: "_" (for /) | Eliminates URL percent-encoding (%2B, %2F) and + space corruption. |
| Padding Rules | Optional trailing "=" omitted | Lengths mod 4 of 2 or 3 restore == or = cleanly; mod 1 fails fast. |
| Target Protocols | JWT (RFC 7519), JWK, PKCE, WebAuthn | Inspect header, payload, and binary signature segments separately. |
| Clarity & Analytics Masking | data-clarity-mask="true" + no query logs | Production bearer tokens never appear in analytics URLs or session replays. |
| Execution Boundary | 100% browser memory | Zero server logging of OAuth claims or secret signatures. |
JWTs use RFC 4648 §5 Base64URL, replacing + and / with - and _ and omitting trailing = padding. This decoder handles both transformations transparently.
Yes, decoding happens 100% locally in browser memory with zero network transmission, masked input elements, and stripped analytics URLs.
No, Base64Doc calculates len % 4 automatically—appending == for mod 2 and = for mod 3 while rejecting impossible mod 1 truncations.
A JWT joins three separate RFC 4648 §5 segments with ASCII dots (header.payload.signature) rather than forming one contiguous Base64 string. Paste an individual header or payload segment to inspect JSON, or the signature segment for hex bytes.
Only characters 62 and 63 differ (+ and / become - and _), and trailing = padding is customarily omitted so strings pass safely through URLs and filenames.
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.