Hex to Text Converter

Convert text to a hex string, or decode hex back to text.

Options

Examples

Questions

Why is the hex output one long string?

A hex byte is always two digits, so it needs no separator. Hashes, color codes and hex literals are written this way too. Decoding still accepts spaces or newlines between pairs.

Does it accept a 0x prefix?

Yes. "0x48 0x69" and "4869" decode to the same thing.

Why do I get an "even number of digits" error?

Every byte is two hex digits, so an odd-length string has a digit missing or extra. Usually it's a typo or a string cut off by one character.

Why isn't a short word like "cafe" detected as hex?

"cafe", "dead" and "beef" only use the letters a–f, so they're valid hex, but they're more likely to be words. The tool only switches to decoding at 8 or more hex digits. For shorter hex, switch the direction yourself.