Base64Doc

Encode Text & Files to Base64URL (RFC 4648 §5)

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

Generate clean URL-safe strings using - and _ with trailing = padding omitted by default for safe query strings, JWT claims, and file names.

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
Encoded Base64, Gateway Budget & Code Snippets Appear Here

Drop any local file up to 100MB+ or type UTF-8 text on the left. No data leaves your browser.

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)

Eliminating + Space Corruption & Slash Path Breaks in URLs

Encode tokens safely for query strings, path segments, and HTTP cookies without +, /, or = breaking routers and parsers.

Read full technical details

Passing standard Base64 inside an HTTP URL creates three immediate failure points: + gets decoded as an ASCII space by application/x-www-form-urlencoded parsers, / splits URL route matching into unintended path segments, and = collides with query-parameter key/value separators.

RFC 4648 §5 Base64URL substitutes - for + and _ for / while omitting trailing = signs. Every emitted character is an unreserved URI character under RFC 3986—eliminating ugly %2B and %2F percent-encoding.

Built for JWT Fixtures, OAuth PKCE & Compact File Identifiers

Craft JWT header/payload mocks, safe S3/R2 object keys, and filesystem-friendly tokens in seconds.

Read full technical details

Because / is illegal in POSIX and Windows filenames and + often causes issues in shell scripts, unpadded Base64URL doubles as a clean filename-safe encoding for content hashes and short binary identifiers.

Optional Trailing = Toggle for Strict Interoperability

Keep trailing = omitted for modern web specs or toggle it on with one click when older libraries require divisible-by-4 strings.

Read full technical details

While RFC 7515/7519 forbid = padding inside JWTs, certain older Java or Python urlsafe_b64decode callers still require multiples of 4. One checkbox flips padding without re-entering input.

Step-by-Step Local Workflow

STEP 1

Enter Text, JSON Claims, or Select Local File

Type plain text, paste JSON JWT payloads, or drop a binary signature/key file; everything stays local inside your browser.

STEP 2

Apply RFC 4648 §5 Alphabet & Omit Padding

Defaults are pre-set to URL-Safe (-/_) and Omit Trailing = so output avoids +, /, and = characters completely.

STEP 3

Toggle Padding Only if Required by Target API

Leave = omitted for JWT (RFC 7519), OAuth PKCE, and URLs, or switch padding on for legacy servers demanding multiples of 4.

STEP 4

Copy URL-Safe Token or Code Template

Grab the clean token directly or switch to JavaScript, Python, Go, or Bash snippets implementing Base64URL.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
Default AlphabetA–Z, a–z, 0–9, "-", "_"Safe in URL paths, query strings, cookies, and POSIX/Windows filenames.
Default Padding SettingOmit trailing "=" enabledMatches JWT, JWS, JWE, and OAuth 2.0 PKCE specifications.
URL Escaping SavingsZero %2B / %2F / %3D bloatAvoids double-encoding bugs across reverse proxies and gateways.
Text SerializationUTF-8 byte stream (TextEncoder)Supports international characters and emoji identically across platforms.
Chunked File Support786 KB Web Worker streamingEncodes multi-megabyte payloads cleanly into URL-safe format too.

Frequently Asked Questions

Should Base64URL strings omit trailing = signs?

Yes, RFC 4648 §5 and JWT/OAuth2 specifications omit = padding because = acts as a query-parameter delimiter in URLs; Base64Doc lets you toggle it freely.

Are UTF-8 characters supported when encoding text to Base64URL?

Yes, all text inputs convert through UTF-8 byte streams via TextEncoder before applying the - and _ alphabet.

Is Base64URL output completely safe inside POSIX and Windows filenames?

Yes, when trailing = is omitted, every character belongs strictly to [A-Za-z0-9_-], avoiding slashes and reserved filesystem symbols.

Can I turn an existing Standard Base64 string into Base64URL without re-encoding from text?

Replace + with -, / with _, and strip trailing = signs; or decode on /base64-decode and re-encode here if you want byte-verified conversion.

Why did my query parameter turn + into a space before reaching the backend?

HTTP query parsers following application/x-www-form-urlencoded decode unescaped + (0x2B) characters as ASCII spaces (0x20). Encoding with RFC 4648 §5 Base64URL (- and _) eliminates that collision permanently.

Explore All 34 Base64 Converters & Developer Tools