Hex to String Converter — Decode UTF-8 Hexadecimal Bytes Online
Convert a hexadecimal byte string back to text. Accepts any separator — space, comma, hyphen, '0x' prefixes, or no separator at all. Invalid UTF-8 sequences show as U+FFFD (�) with a clear warning. 100% local.
Last updated:
Need to go the other way? String to Hex →
Paste hex bytes (any separator: space, comma, hyphen, '0x' prefix, or none) to decode back to UTF-8 text. Invalid UTF-8 shows as '�' (U+FFFD) with a warning.
What is Hex to String?
Hex-to-string decoding is the inverse: parse hex digits in pairs, interpret each pair as a byte, then decode the byte sequence as UTF-8. The two tricky parts are input tolerance and error handling. Real-world hex comes in many separator styles — this tool strips every non-hex character before parsing, so '48 65 6c 6c 6f', '48,65,6c,6c,6f', '0x48 0x65 0x6c 0x6c 0x6f', and '48656c6c6f' all decode to 'Hello'. For error handling, invalid UTF-8 byte sequences become U+FFFD (the Unicode replacement character), with a warning shown so you know decoding wasn't clean — most commonly, this happens when the input was actually Latin-1 or Windows-1252 hex rather than UTF-8.
How to convert hex to text online
- 1Paste hex — any format with hex digits (0-9, a-f, A-F).
- 2The tool strips all separators, groups digits in pairs, and decodes as UTF-8.
- 3Read the output. A '�' means invalid UTF-8 — try Python 'bytes.decode("latin-1")' if the source is legacy.
- 4Verify the byte count in the output — if unexpected, the input might have been HTML-entity-encoded, base64-wrapped, or padded.
Use Cases
Decode a hex dump from a debugger
gdb, hexdump, xxd all produce hex-dump-style output. Paste the bytes and see the string.
Reverse-engineer a serialized packet
Extract the printable part of a raw network payload without opening a hex editor.
Sanity-check a string-to-hex conversion
Round-trip through both tools to verify a downstream system's encoding assumption is correct.
Key Concepts
- U+FFFD replacement character
- The Unicode standard's fallback for undecodable bytes. Every UTF-8 decoder inserts it when the input is malformed — a visible sign that something upstream is wrong.
Tips & Best Practices
- ▸If the output is gibberish but no '�' appears, the source encoding is probably not UTF-8 (often Latin-1). This tool always assumes UTF-8.
- ▸Odd-length inputs are left-padded with '0' — mostly a convenience for pasting partial dumps. Verify the length is even if strictness matters.
- ▸Common source formats: openssl `-hex`, xxd, Python `.hex()`, and JS `Buffer.toString('hex')` all produce lowercase continuous hex. All work here.
Frequently Asked Questions
What separator formats does the input accept?
Any format. All non-hex characters are stripped, so '48 65 6c 6c 6f', '48,65,6c,6c,6f', '0x48 0x65 0x6c 0x6c 0x6f', or '48656c6c6f' all decode to the same result.
What if the hex has an odd number of digits?
The input is left-padded with a 0 and decoded — a common convention for parsing partial or truncated hex. If you want stricter behavior, verify the input length is even before pasting.
Why do I see '�' in the output?
That's the Unicode replacement character (U+FFFD), inserted when the byte sequence isn't valid UTF-8. Common causes: bit truncation, wrong encoding (was it Latin-1?), or copy-paste errors. The tool flags this with a warning banner.
Is hex decoding language-agnostic?
The hex-to-byte step is universal. The byte-to-text step depends on encoding — this tool uses UTF-8 (the modern standard). For legacy Latin-1 or Windows-1252 data, use the Node.js Buffer or Python 'bytes.decode("latin-1")' instead.
Related Tools
Regex Tester
Test regular expressions online. Live match highlighting, capture groups, and support for JavaScript flags (g, i, m, s, u, y).
Regex Replace
Find and replace text with a regular expression online. Supports every JavaScript flag (g, i, m, s, u, y), all backreferences ($1..$9, $&, $`, $', $<name>), and escape sequences (\n, \t) in the replacement. Live match-by-match preview and diff. 100% local.
Text to Speech
Convert text to spoken audio using your browser's built-in Speech Synthesis API. Pick from all voices installed on your OS, adjust rate, pitch, and volume. No account, no download, no upload — 100% local.
XML Formatter
Format, beautify, and validate XML documents online. Handles namespaces, CDATA sections, and mixed content.
SQL Formatter
Format and beautify SQL queries. Supports SELECT, JOIN, subqueries, CTEs, and multiple SQL dialects.
Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and more.