Hex to text converter
Convert hexadecimal to text and back, tolerating whitespace, commas, and `0x` prefixes. Runs entirely in your browser.
Open in ctfpalHex 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. Anyg-zrules it out immediately. - Common decorations:
0xprefixes,\xescapes, 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 characters | Bytes | Likely meaning |
|---|---|---|
| 32 | 16 | MD5, or an AES-128 key/IV |
| 40 | 20 | SHA-1, or a Git object hash |
| 64 | 32 | SHA-256, or an AES-256 key |
| 128 | 64 | SHA-512 |
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 0x7dResult
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 workspaceCommon 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.
Part of a module
1. Recognising encodings
Tell Base64 from hex from Base32 from binary on sight, peel layered encodings, and learn why an encoding is not encryption.
Practise on real challenges
Go deeper
- Spot the encoding: reading base64, base32, hex and friends at a glanceAlphabet, length, and padding are enough to name almost any encoding on sight. A field guide to the encodings CTFs actually use, the magic prefixes that tell you what is underneath, and the traps that make a correct guess look wrong.
Related tools
Base64 decoder and encoder
Decode and encode Base64 and Base64-URL in the browser, with padding repair and automatic detection of nested encodings. Nothing is uploaded.
Binary to text converter
Convert binary (and decimal codepoints) to text and back. Handles 7-bit and 8-bit groupings, arbitrary separators, and reversed bit order.
Hex viewer and hexdump
Inspect any file byte by byte with a side-by-side hex and ASCII view, offsets, and structure highlighting.
Magic byte and file signature table
Look up any file format by its magic bytes, or any byte sequence by format - including the trailers that mark where a file ends.