Converter Tools
Base64 to Hex Converter
Convert Base64 to hexadecimal and hex back to Base64 in your browser. Byte-accurate for keys, hashes, and binary data. Standard and URL-safe. No signup.
Bytes are converted directly between the two encodings, so binary data like keys, hashes, and signatures round-trips exactly. Nothing is uploaded.
Quick conversions
Base64 input
8 charsHex output
48656c6c6f21
Bytes: 6
Output length: 12 chars
These bytes look like UTF-8 text
Hello!
Shown only as a convenience. The conversion itself works on raw bytes and does not depend on the data being text.
How to use
- Pick a direction at the top: Base64 to Hex, or Hex to Base64. Use Swap to flip the direction and carry the current result across.
- Paste your data into the input box. Base64 may use the standard or URL-safe alphabet and may include line breaks; hex may include spaces, colons, commas, or 0x prefixes.
- For Base64 to Hex, choose a hex output style (continuous, space, colon, 0x prefix, or 0x array) and toggle uppercase if you need it. For Hex to Base64, choose the standard or URL-safe Base64 alphabet.
- Read the converted output and the byte count, then click Copy to grab the result.
- If the bytes decode to readable text, an optional UTF-8 preview appears below. Everything runs in your browser.
About this tool
Base64 to Hex Converter transcodes data directly between Base64 and hexadecimal in both directions, treating the input as a sequence of raw bytes rather than text. That distinction matters: the usual approach of decoding Base64 to text and then re-encoding as hex only works when the underlying bytes happen to be valid UTF-8, and it silently corrupts anything else, including encryption keys, password hashes, initialization vectors, digital signatures, and raw certificate or protocol bytes. This tool never goes through a text step, so any binary blob round-trips between the two encodings exactly. Base64 to Hex mode decodes the Base64 input into bytes and renders them as hex, with output styles for continuous digits, space-separated bytes, colon-separated bytes (the style openssl and Wireshark use), a 0x-prefixed string, or a 0x-prefixed comma list ready to paste into source code, plus an optional uppercase toggle. The Base64 reader accepts both the standard alphabet (the + and / characters from RFC 4648 section 4) and the URL-safe alphabet (the - and _ characters from section 5), detects the alphabet automatically, ignores the line breaks that wrapped Base64 often carries, tolerates missing padding the way real decoders do, and reports the exact position of any invalid character. Hex to Base64 mode parses hex input permissively: it strips spaces, colons, commas, and 0x or backslash-x prefixes, validates that the remaining digits form whole bytes, then emits Base64 in either the standard or URL-safe alphabet. A one-click Swap button carries the current result over as the input for the opposite direction so a full round-trip is effortless, and when the decoded bytes happen to be readable text the tool shows a UTF-8 preview as a convenience. Everything runs locally in your browser, so the keys, tokens, and hashes you are converting never leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Base64 Encoder Decoder
Encode and decode Base64 with full Unicode.
Open tool
ConverterHex to Text Converter
Bidirectional hex and text converter with UTF-8 bytes and a hex dump view.
Open tool
DeveloperBase32 Encoder / Decoder
Two-way Base32 with RFC 4648 Standard, Hex, and Crockford alphabets.
Open tool
DeveloperBase58 Encoder / Decoder
Encode and decode Base58 with Bitcoin, Ripple, Flickr alphabets and Base58Check.
Open tool
SecuritySHA-256 Hash Generator
Hash text or files with SHA-1, SHA-256, SHA-384, and SHA-512.
Open tool