Skip to content
All tools
EncodingRuns locallyNo account

Hex to text converter

Convert hexadecimal to text and back, tolerating whitespace, commas, and `0x` prefixes. Runs entirely in your browser.

Open in ctfpal

Hex writes each byte as two characters from 0-9a-f. It is the lingua franca of everything binary: hashes, keys, packet dumps, magic bytes, memory addresses. Unlike Base64 it is easy to read at a glance, which is exactly why it shows up whenever a challenge wants you to see the bytes rather than hide them.

How to recognise it

  • Only 0-9, a-f, A-F, and the length is even. Any g-z rules it out immediately.
  • Common decorations: 0x prefixes, \x escapes, space or colon separators (de:ad:be:ef), and line-wrapped dumps.
  • A bare 32/40/64-character hex string is almost certainly a hash - send it to the hash identifier rather than decoding it as text.

Hex is also the format in which people make transcription mistakes, because a dropped character shifts every byte after it by half a byte and produces output that is uniformly wrong rather than locally wrong. An odd-length hex string is always a copy-paste error, never a valid encoding - if a decode fails on the length, count the characters before looking for an exotic variant.

Length tells you a lot

Hex charactersBytesLikely meaning
3216MD5, or an AES-128 key/IV
4020SHA-1, or a Git object hash
6432SHA-256, or an AES-256 key
12864SHA-512
Before decoding hex as text, check whether the length is a digest length.

Worked example

Hex with 0x prefixes

Input

0x70 0x69 0x63 0x6f 0x43 0x54 0x46 0x7b 0x68 0x33 0x78 0x5f 0x69 0x73 0x5f 0x66 0x75 0x6e 0x7d

Result

picoCTF{h3x_is_fun}

Prefixed and space-separated, the way a disassembler prints it. The `0x` markers are noise, not data, and come off before the decode.

Load this example in the workspace

Common questions

How do I tell hex from a hash?
By length and by whether it decodes to readable text. Hashes are fixed-length (32, 40, 64, 128 hex characters) and decode to noise. If your hex is one of those lengths, identify it as a hash first.