Base64Doc

Decode Base64 Strings to PNG Images

100% Browser Local · 0 File Uploads · 100MB+ Ready

Verify true PNG IHDR dimensions, reveal transparent icons on a checkerboard canvas, repair broken Data URI headers, and export lossless .png assets.

Try 1-Click Synthetic Samples (Zero-Trademark):

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.

0 chars
Decoded Result & Document Actions Appear Here

Paste any Base64 string, Data URI, Postman JSON, SOAP XML, HAR, or EML payload on the left.

Interactive Synthetic Showcase Gallery

Load real client-side verified payloads straight into the workbench above. Zero third-party trademarks.

Free · InstantCASE-1

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)
Real browser-decoded output preview (client-side only)
Free · InstantCASE-2

ERP Payload -> PK\x03\x04 Verified 3-Sheet Excel Preview

Input Payload
ERP Base64 Payload (122.8 KB)
Verified Output
Summary (128 rows x 11 cols), LineItems (48 rows), Tax (24 rows) -> .xlsx / .csv / .json
Real browser-decoded output preview (client-side only)
Free · InstantCASE-3

Broken Data URI + MIME Fix + White Transparent Logo

Input Payload
Broken data:image/jpeg;base64 + \/ + newlines (4.9 KB)
Verified Output
Auto-fixed to image/png (512x512 px) + Checkerboard reveals white emblem
Real browser-decoded output preview (client-side only)
Free · InstantCASE-4

Gzip + Base64 Unpack & Korean EUC-KR Mojibake Self-Heal

Input Payload
Gzipped Base64 (212 chars) + EUC-KR Receipt
Verified Output
Gunzipped JSON + EUC-KR Hangul receipt recovered from UTF-8 replacement chars
Real browser-decoded output preview (client-side only)
Free · InstantCASE-5

40-Page Contract Slimming + Gateway Green-Light Check

Input Payload
40-Page Synthetic Contract PDF (33.7 KB)
Verified Output
Extract Page 1 -> +33.3% Base64 fits comfortably under 4.5 MB Vercel limit
Real browser-decoded output preview (client-side only)

Why 8-Byte PNG Signature & IHDR Verification Matters

Catch line-ending mangling and mislabeled JPEG bytes immediately instead of downloading corrupted PNG files that fail downstream pipelines.

Read full technical details

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.

Alpha Transparency Auditing on White Icons & Signatures

Inspect transparent PNG signatures, badges, and white UI assets on a crisp checkerboard or dark canvas right in your browser.

Read full technical details

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.

Safe Local Raster Conversion From SVG or WebP

Convert decoded vector SVGs or WebP payloads into lossless .png files locally whenever legacy software refuses modern image formats.

Read full technical details

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.

Step-by-Step Local Workflow

STEP 1

Paste PNG Base64 String or Data URI

Drop a raw string starting with iVBORw0KGgo or a wrapped data:image/png;base64 payload; whitespace and JSON escapes are cleaned automatically.

STEP 2

Validate 8-Byte Signature & IHDR Chunk

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.

STEP 3

Inspect Alpha Channel on Checkerboard Canvas

Toggle Checkerboard or Dark mode to verify clean transparent edges on white icons, watermarks, or QR stickers.

STEP 4

Save Lossless .png Locally

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.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
8-Byte PNG Magic Header89 50 4E 47 0D 0A 1A 0AEncodes to iVBORw0KGgo in Base64; detects line-ending corruption instantly.
IHDR Geometry ChunkOffsets 16–24 (Big-Endian)Reads exact pixel width, height, bit depth, and color type (6 = RGBA).
Extension Conflict GuardDetects JPEG/WebP/SVG masqueradingBlocks blind .png download when payload actually holds FF D8 FF JPEG bytes.
Alpha Preview CanvasCheckerboard / Dark / LightVerifies transparent fringes without launching external editors.
Client Privacy0 network image uploadsDecodes QR codes, receipts, and signature PNGs strictly in browser RAM.

Frequently Asked Questions

How does Base64Doc verify that my Base64 string is really a lossless PNG?

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.

Why do valid Base64 PNG strings almost always begin with iVBORw0KGgo?

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.

Can I save a WebP or SVG Base64 payload as PNG here?

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.

How can I tell if a PNG has a transparent alpha channel instead of a solid white box?

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.

What happens if a PNG Base64 payload was truncated mid-stream?

Invalid length % 4 === 1 strings fail validation immediately, and incomplete IHDR/IDAT payloads trigger clear browser decode diagnostics rather than silent blank downloads.

Explore All 34 Base64 Converters & Developer Tools