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)
Drop .svg icons or paste raw <svg> markup to produce clean RFC 4648 Base64, Data URIs with image/svg+xml, and copy-ready CSS background-image snippets.
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.
Understand when Base64 SVG eliminates brittle # hex color and quote-escaping bugs across CSS preprocessors, JSON themes, and legacy parsers.
Inline UTF-8 SVGs like url("data:image/svg+xml,<svg fill='#000'>...") look slightly shorter on paper, yet routinely break in production: browsers treat an unencoded # as a URL fragment identifier (truncating the rest of the SVG), while nested single and double quotes collide with PostCSS, Tailwind arbitrary values, and JSON configuration files.
Encoding SVG markup to data:image/svg+xml;base64 emits strictly alphanumeric characters plus +, /, and =. Even though Base64 adds +33.33% pre-Gzip character length, HTTP Brotli/Gzip compresses repeated markup patterns effectively and eliminates every escaping ambiguity.
Copy vector XML straight out of Figma or your IDE into the studio input to generate clean CSS rules in two seconds.
Front-end developers tweaking a 400-byte chevron icon rarely want to save an intermediate file just to encode it. Pasting raw <svg xmlns="http://www.w3.org/2000/svg" ...> markup into Encode mode handles UTF-8 serialization automatically—avoiding native window.btoa() InvalidCharacterError traps when SVG labels contain non-ASCII glyphs.
Combine encoded monochrome SVG masks with CSS currentColor or background rules for crisp resolution-independent UI elements.
When styling native select dropdowns, checkboxes, or loading spinners, CSS background-image and mask-image Data URIs keep every icon bundled inside one stylesheet with zero network waterfall.
Paste XML straight from your code editor or Figma Copy-as-SVG clipboard, or drop an .svg asset from disk with zero server upload.
Base64Doc converts XML text through TextEncoder UTF-8 byte streams rather than btoa(), preventing crashes on non-Latin SVG labels or symbols.
Toggle Data URI mode to emit data:image/svg+xml;base64,PHN2Zy..., eliminating unescaped #, angle brackets, and quote collisions in CSS.
Grab ready-to-paste CSS url(...) rules, HTML <img> tags, or Markdown image links right from the export tabs.
| Capability | Base64Doc Behavior | Engineering Notes |
|---|---|---|
| Data URI Header | data:image/svg+xml;base64, | Universal compatibility across CSS url(), Sass/PostCSS, and JSON configs. |
| vs URL-Encoded UTF-8 SVG | +33.3% size vs %23 / %22 escapes | Base64 avoids CSS preprocessor parser breaks and unencoded # hash bugs. |
| UTF-8 Safety | TextEncoder -> Uint8Array | Handles CJK, Cyrillic, and typographic glyphs inside <text> elements. |
| CSS Integration Targets | background-image & mask-image | Ideal for custom checkboxes, arrows, and monochrome theme masks. |
| Execution Environment | 100% browser local | Proprietary brand vector logos never touch third-party endpoints. |
Base64 eliminates #, quote, and angle-bracket escaping conflicts across CSS preprocessors, Tailwind arbitrary URLs, and JSON theme payloads, trading +33.3% raw length for universal parser safety.
Yes, paste your <svg> code directly in Encode mode and Base64Doc converts the UTF-8 bytes and wraps them in data:image/svg+xml;base64 automatically.
Yes, external SVG Data URIs rendered in CSS or <img> tags require the W3C SVG namespace attribute on the root <svg> element to render properly in Chrome, Safari, and Firefox.
Native btoa() throws InvalidCharacterError on UTF-8 characters above U+00FF (such as em-dashes, currency signs, or CJK text). Base64Doc encodes UTF-8 bytes via TextEncoder first.
Yes, apply the Data URI to CSS mask-image alongside background-color: currentColor rather than background-image, allowing dynamic theme tinting.
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.