Base64Doc

Decode RFC 4648 §5 Base64URL Strings

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

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.

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 Standard Base64 Decoders Fail on JWT & OAuth Tokens

Decode unpadded RFC 4648 §5 Base64URL tokens containing - and _ cleanly instead of hitting InvalidCharacterError in atob() or base64 -d.

Read full technical details

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.

Safe Local Inspection for Production OAuth & WebAuthn Payloads

Inspect live JWT claims, PKCE verifiers, and passkey clientDataJSON strictly inside browser memory without sending bearer tokens to external sites.

Read full technical details

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.

Switching Effortlessly Between JSON Claims and Hex Signatures

Read decoded UTF-8 JSON headers and payloads in plain text, or inspect raw binary signature segments in the Hex + ASCII viewer.

Read full technical details

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.

Step-by-Step Local Workflow

STEP 1

Paste Base64URL Segment or Unpadded Token

Drop URL-Safe query values, JWT header/payload segments, WebAuthn clientDataJSON, or JWK keys containing - and _.

STEP 2

Translate §5 Alphabet & Restore Missing =

The decoder maps - (0x2D) to + and _ (0x5F) to /, then checks length % 4 (rejecting impossible mod-1 lengths) and restores required = padding.

STEP 3

Inspect Decoded UTF-8 JSON or Binary Hex

View readable JSON claims, check raw cryptographic hashes in the Hex + ASCII inspector, or preview embedded binaries.

STEP 4

Copy Claims or Re-Encode in Standard Format

Copy formatted text or switch modes to inspect exact hex bytes—all with zero network exposure.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
RFC 4648 §5 Substitutions62: "-" (for +), 63: "_" (for /)Eliminates URL percent-encoding (%2B, %2F) and + space corruption.
Padding RulesOptional trailing "=" omittedLengths mod 4 of 2 or 3 restore == or = cleanly; mod 1 fails fast.
Target ProtocolsJWT (RFC 7519), JWK, PKCE, WebAuthnInspect header, payload, and binary signature segments separately.
Clarity & Analytics Maskingdata-clarity-mask="true" + no query logsProduction bearer tokens never appear in analytics URLs or session replays.
Execution Boundary100% browser memoryZero server logging of OAuth claims or secret signatures.

Frequently Asked Questions

Why do standard Base64 tools throw invalid character errors on JWT or OAuth tokens?

JWTs use RFC 4648 §5 Base64URL, replacing + and / with - and _ and omitting trailing = padding. This decoder handles both transformations transparently.

Is it safe to inspect production OAuth or JWT claims here?

Yes, decoding happens 100% locally in browser memory with zero network transmission, masked input elements, and stripped analytics URLs.

Do I need to add missing = signs manually before pasting a Base64URL string?

No, Base64Doc calculates len % 4 automatically—appending == for mod 2 and = for mod 3 while rejecting impossible mod 1 truncations.

Why did pasting a full 3-part dot-separated JWT behave differently from a single segment?

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.

What is the difference between Base64URL and standard Base64?

Only characters 62 and 63 differ (+ and / become - and _), and trailing = padding is customarily omitted so strings pass safely through URLs and filenames.

Explore All 34 Base64 Converters & Developer Tools