Hex ↔ Base64 Converter

Convert between Hexadecimal (hex) and Base64 formats. Hex input accepts raw hex, 0x-prefixed, or space-separated bytes. Output hex in 4 formats: lowercase/uppercase, with/without spaces or 0x prefix.
All processing happens locally in your browser — your data is never uploaded to any server.
Direction: Hex fmt:
Hex → Base64: Enter a hexadecimal string to encode to Base64. Supports raw hex (48656c6c6f), 0x-prefixed (0x48 0x65), and space-separated byte (48 65 6c 6c 6f) — spaces are auto-removed.
Base64 → Hex: Enter a Base64 string to decode back to hexadecimal bytes. Input can use standard or URL-safe Base64 (auto-detected via -_ characters).
Hex Output Formats: aa (lowercase), AA (uppercase), aa bb (space-separated lowercase), 0xAA (0x-prefixed uppercase).
URL-safe: Replaces + with - and / with _, and strips trailing = padding.
Hex, binary and Base64 are the same bytes

Hex and Base64 are two textual views of one byte string — hex spends 2 characters per byte and stays human-readable, Base64 spends 4 characters per 3 bytes and stays compact. Converting between them always passes through the raw bytes underneath.

The chain hex → bytes → Base64 round-trips losslessly — any size difference is purely notation, never data.