Base64Doc

Convert Hexadecimal Strings to Base64

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

Paste compact hex, 0x-prefixed arrays, or colon-separated digests to encode Standard or URL-Safe Base64 with Fail-Fast odd-nibble validation.

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)

Shrinking 2x Hex Digests & UUIDs Into Compact Base64

Convert verbose 64-character hex SHA-256 hashes or 32-character UUIDs into 43- or 22-character Base64 strings without losing a single bit.

Read full technical details

Hexadecimal represents each 8-bit byte as two ASCII characters—a 100% size expansion (2.0x) that bloats URLs, Subresource Integrity (SRI) attributes, and token payloads. Converting hex bytes into Base64 packs 6 bits per character instead of 4, cutting character length by one-third immediately.

For example, a standard 16-byte UUID (32 hex chars without hyphens) shrinks to just 22 unpadded Base64URL characters, while a 32-byte OpenSSL SHA-256 digest compresses from 64 hex chars into a standard 44-char sha256-<base64> SRI hash.

Parsing 0x Literals, Colon Fingerprints & Spaced Wireshark Dumps

Paste OpenSSL colon-separated fingerprints or C-style 0x48, 0x65 byte arrays directly without manual regex cleanup.

Read full technical details

Real debugging inputs rarely arrive as tidy lowercase hex strings. Certificate inspectors print A4:3F:09:..., C compilers export {0x48, 0x65}, and Wireshark copies space-delimited octets. Base64Doc strips those recognized separators cleanly before pairing nibbles.

Fail-Fast Odd-Nibble Guard Prevents Silent Corruption

Catch missing nibbles or accidental letter O/G typos right at the input boundary instead of emitting silently wrong Base64.

Read full technical details

Notice a common gotcha: pasting raw ASCII text "4865" converts the bytes 0x48 0x65 ("He"), not the ASCII string "4865". And if a copy-paste dropped one nibble (producing an odd hex count), Fail-Fast validation aborts with an explicit error instead of guessing a leading zero.

Step-by-Step Local Workflow

STEP 1

Paste Any Hexadecimal Representation

Insert continuous SHA-256 strings, 0xFF C/JS byte literals, spaced Wireshark dumps, or colon-separated TLS fingerprints.

STEP 2

Run Strict Nibble-Pair Validation

Base64Doc cleans allowed delimiters and immediately rejects odd nibble counts or non-[0-9a-fA-F] symbols with the exact offending token.

STEP 3

Select Standard or Unpadded Base64URL

Toggle RFC 4648 §5 URL-Safe and Omit Trailing = when turning binary hex digests into JWT kids, SRI hashes, or webhook signatures.

STEP 4

Copy Compact Base64 Output

Grab the encoded string (33% shorter than raw hex!) or copy matching language snippets.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
Accepted Hex DelimitersCompact, Space, Colon (:), 0x, CommaParses xxd, OpenSSL fingerprints, and C byte arrays seamlessly.
Encoding Compression2.00x Hex -> 1.33x Base64Converts 64 hex chars (32 B) into 44 Base64 or 43 Base64URL chars.
Fail-Fast ValidationRejects odd nibbles & bad charsNever silently zero-pads half-bytes; surfaces exact error location.
Target Use CasesSRI sha256-..., JWT x5t, UUIDsConvert 32-char UUID hex into 22-char compact Base64URL slugs.
Execution Model100% browser-local RAMZero risk of leaking raw cryptographic keys or salts.

Frequently Asked Questions

What hex input formats are supported when converting Hex to Base64?

4 hex input styles work natively: continuous pairs, space-separated bytes, colon-delimited MAC/TLS fingerprints, and 0x-prefixed arrays. Any non-[0-9a-fA-F] symbol triggers a Fail-Fast offset error.

Can I output unpadded URL-Safe Base64 directly from hex hashes?

Yes, enable RFC 4648 §5 URL-Safe and Omit Trailing = to convert SHA-256 hex digests straight into JWT or SRI-ready Base64URL.

Why does Hex to Base64 reject an odd number of hex digits?

Every byte requires exactly 2 hex nibbles (8 bits); an odd nibble count indicates a truncated hex string and cannot map cleanly to whole bytes.

How do I generate an HTML Subresource Integrity (SRI) hash from an OpenSSL hex digest?

Paste the 64-character SHA-256 hex digest here in Standard Base64 mode (with = padding kept) and prepend "sha256-" to the 44-character result.

Are raw secret key hex strings safe to convert on this page?

Yes, parsing and encoding run completely inside browser memory with zero network uploads.

Explore All 34 Base64 Converters & Developer Tools