Hexadecimal Escape Decoder
Decode \xHH escape sequences — copied from source code, a log, or a regex — back into readable text.
How to Decode Hex Escape Sequences
Extract every \x escape and its 2 hex digits, treat each as one byte, then decode the full sequence of bytes as UTF-8 text — reversing exactly what a hex escape converter does when encoding text into a string literal.
Common Mistakes Decoding Hex Escapes
- Including the surrounding quotes from a code string literal in the input.
- Mixing plain text in with the escapes instead of a pure \x sequence.
- Assuming every byte sequence is valid UTF-8 — some escaped data is genuinely binary.
Frequently Asked Questions
How do you decode \xHH escapes?
Find each \x followed by 2 hex digits, take that as one byte, then decode the full sequence of bytes as UTF-8 text.
What input format does this expect?
A continuous run of \xHH escapes with no other characters mixed in — copy just the escaped portion of a string literal, not the surrounding quotes or code.
Where do \xHH escapes show up?
Inside string literals in source code, in some log output that escapes non-printable bytes, and occasionally in URL or regex patterns that use this notation for raw byte values.
What if the escapes don't decode to valid text?
The calculator flags it — not every byte sequence forms valid UTF-8, so genuinely binary escaped data won't produce readable output.
Does this handle multi-byte characters split across several escapes?
Yes — a UTF-8 character spanning 2-4 bytes will show as that many consecutive \xHH escapes, and this decoder reassembles them into the single character they represent.
Is this the reverse of the Hex Escape Converter?
Yes — that page encodes text into \xHH escapes; this page decodes them back.