Hex Decoder
Online hexadecimal to text converter — decode hex to text, encode text to hex, copy and paste the result.
This free online hex decoder converts hexadecimal (Base16) strings to readable UTF-8 or ASCII text — paste any hex string to decode it to text instantly, or encode text to hex with one click. Auto-detects space, comma, 0x-prefix, and no-delimiter formats. Swap decode/encode in one click, adjust output delimiter and case, then copy the result. No signup required, runs entirely in your browser.
Mode
Input delimiter
Output delimiter
Hex case
Quick reference
- 48 65 6c 6c 6f
- → "Hello"
- 0x48 0x65 0x6c
- → "Hel"
- 48656c6c6f
- → "Hello" (no delim)
- e2 9c 93
- → ✓ (UTF-8 multi-byte)
- f0 9f 98 8a
- → 😊 (4-byte emoji)
What is a hex decoder? (hexadecimal to text)
A hex decoder is a tool that converts hexadecimal (Base16) values back into readable text, binary, or decimal formats. Hexadecimal encodes binary data as a string of base-16 characters — the digits 0–9 and the letters A–F. Since each hex digit encodes 4 bits, two hex digits together represent one full byte (8 bits). The letter 'H', for example, has ASCII/UTF-8 code 72 decimal, which is 48 in hex. So "Hello" encodes as 48 65 6c 6c 6f.
Hex decoding is widely used by developers to debug network packets, inspect binary data, and interpret raw system payloads. Paste a hex string into the input above and the decoder reassembles it into readable text instantly. Hex encoding is everywhere in programming: CSS color codes (#ff5733), memory addresses, network packet dumps, cryptographic hashes, and binary file inspection all use it.
Unlike Base64, hex is not a compression format — it expands data to exactly twice its original size (one byte → two hex characters). The advantage is readability: you can scan a hex dump and identify individual bytes at a glance, which makes it the format of choice for debugging, protocol analysis, and low-level system work.
How to decode hex to text online
Paste your hex string into the input area above with the mode set to Hex → Text. The decoder auto-detects whether your hex is space-separated (48 65 6c 6c 6f), comma-separated (48,65,6c), 0x-prefixed (0x48 0x65 0x6c), or has no delimiter at all (48656c6c6f). Each pair of hex digits becomes one byte value, and the byte sequence is then decoded as UTF-8 text — including multi-byte characters like accented letters, CJK characters, and emoji.
If the decoder reports an error, the most common causes are: an odd number of hex characters (a stray nibble or missing digit), a non-hex character in the input (like g or z), or a delimiter mismatch (switch from Auto-detect to a specific delimiter if the output looks wrong).
How to encode text to hex
Switch the mode to Text → Hex and type or paste any UTF-8 text. The encoder uses the browser's built-in TextEncoder to convert the string to its UTF-8 byte representation, then formats each byte as two hex digits. Use the Output delimiter option to choose your preferred format (space, comma, 0x prefix, or no delimiter) and Hex case to toggle between lowercase and uppercase output. Click Copy to copy and paste the hex string directly into your project or terminal.
How to decode hex to text in Python, JavaScript & more
If you need to decode hex to text programmatically, every major language has a one-liner. Use this tool for quick interactive decoding; use the snippets below when you need it inside a script.
Python
hex_string = "48 65 6c 6c 6f"
# Remove spaces, then decode
decoded = bytes.fromhex(hex_string.replace(" ", "")).decode("utf-8")
print(decoded) # Hello
JavaScript (browser & Node.js)
const hex = "48656c6c6f";
const decoded = new TextDecoder().decode(
new Uint8Array(hex.match(/.{1,2}/g).map(b => parseInt(b, 16)))
);
console.log(decoded); // Hello
Node.js (Buffer)
const decoded = Buffer.from("48656c6c6f", "hex").toString("utf8");
console.log(decoded); // Hello
PHP
echo hex2bin("48656c6c6f"); // Hello
For the reverse (text → hex): Python uses text.encode("utf-8").hex(), JavaScript uses Array.from(new TextEncoder().encode(text)).map(b => b.toString(16).padStart(2,'0')).join(' '), and Node.js uses Buffer.from(text, "utf8").toString("hex").
Common hex encoding use cases
- Debugging network traffic & hex dumps — protocol analyzers (Wireshark, tcpdump) show packet payloads as hex dumps. Paste a hex dump into this decoder to extract embedded strings, error messages, or credentials from captured network data.
- Cryptographic output — hash functions (MD5, SHA-256) and encryption algorithms output raw bytes that are conventionally displayed as hex strings. The SHA-256 hash of "hello" is
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. - Binary file inspection — strings embedded in binary files (executable paths, error messages, config keys) are often recoverable by decoding consecutive printable-range hex bytes.
- Source code literals — languages like C, Python, and Go accept hex byte literals in string definitions:
"\x48\x65\x6c\x6c\x6f"is "Hello". Convert between the two representations here. - Color codes — CSS hex colors are three bytes:
#1e293b→ R=0x1e (30), G=0x29 (41), B=0x3b (59). Encoding these values as hex is how colors map to their byte representation.
Hex vs Base64 — which to use?
Both hex and Base64 encode binary data as printable ASCII, but they serve different purposes:
- Use hex when you need to inspect individual bytes — debugging, protocol analysis, checksum verification. Hex is human-readable at the byte level: each pair of characters is one byte with no ambiguity.
- Use Base64 when size matters and human readability is not required — email attachments (MIME), data URLs, JSON Web Tokens (JWT), and API payloads. Base64 adds only 33% overhead versus hex's 100%.
The rule of thumb: hex for inspection and debugging, Base64 for transmission and storage. Neither is encryption — both are reversible encodings with no secret key.
Working with other developer utilities? See the Cron Expression Generator for scheduling syntax, or the CSS Box Shadow Generator for design work.
Frequently asked questions
41 in hex. Hex is used for color codes, memory addresses, cryptographic hashes, and debugging binary data because it maps directly to raw bytes with no ambiguity.
48 65 6c), comma-separated (48,65,6c), 0x-prefixed (0x48 0x65), and no delimiter (48656c). This tool auto-detects all of them, or you can force a specific delimiter in the options panel.
0x is a C-language convention that flags a number as hexadecimal. 0x48 means the hex value 48 (decimal 72, the ASCII code for 'H'). It is notation only — the decoder strips it before processing. You will see it in source code, memory addresses, and low-level protocol dumps.
TextDecoder with UTF-8 encoding. Multi-byte UTF-8 sequences — including accented letters, CJK characters, and emoji — are decoded correctly as long as the hex represents valid UTF-8. For plain ASCII text (bytes 0x00–0x7F), UTF-8 and ASCII are identical, so the decoder works for both — 48 65 6c 6c 6f decodes to "Hello" under either encoding.