Hex to ASCII Converter — Decode Hex Bytes into Readable Characters
Last updated:
Decode a hex byte sequence back into the ASCII characters it represents. Every pair of hex digits becomes one byte, and every byte maps to one of the 128 ASCII code points — useful for reading hex dumps, debugger output, packet payloads, or any place a string was stored in its raw 2-digits-per-byte form.
Hex ⇄ ASCII Converter
How hex to ASCII decoding works
The converter cleans the input by removing whitespace and any 0x prefix, then walks the resulting hex string two characters at a time. Each pair is parsed as a base-16 number, giving a value between 0 and 255. Because this tool enforces strict 7-bit ASCII, any byte above 127 stops the conversion and the position of the offending byte is reported. Bytes inside range become characters via String.fromCharCode.
Quick examples
| Hex | ASCII |
|---|---|
48656C6C6F | Hello |
41 | A |
20 | (space) |
30 31 32 | 012 |
0x48 0x69 | Hi |
48656C6C6F2C20576F726C6421 | Hello, World! |
How to use
- Paste your hex bytes into Input. Spaces, line breaks, and any
0xprefixes are stripped automatically. - The decoded ASCII text appears in Output as you type. Errors highlight the byte position so you can locate non-ASCII data.
- To go the other direction, click ASCII → Hex at the top of the converter, or use Swap to flip both panes.
- Click Copy to grab the decoded string. Conversion runs entirely in your browser — nothing is uploaded.
Real-world use cases
- Hex dump inspection. Tools like
xxd,hexdump, and Wireshark print byte streams in hex. Pasting the bytes here recovers any ASCII strings buried inside the dump — filenames, error messages, protocol commands — which is often the fastest way to identify what a captured payload contains. - Debugger output. Memory inspection windows in GDB, lldb, or Visual Studio show register and pointer contents as hex. When a pointer should be a C-string, decoding the surrounding bytes confirms whether the data was already corrupted before reaching your breakpoint.
- HTTP / cookie / token analysis. Some HTTP headers, cookies, and JWT segments use hex-encoded ASCII for opaque fields. Decoding them in place reveals whether the contents are structured text (e.g. JSON, base64-wrapped) or opaque binary, without needing to write a one-off script.
- Binary protocol decoding. Many wire protocols (Redis RESP, BLE characteristics, raw TCP traces) carry ASCII commands sandwiched in binary framing. The strict-ASCII mode here surfaces exactly which bytes are text and where the binary framing starts.
- Recovering corrupted strings. When a memory dump or hex blob is suspected to contain ASCII text, partial decoding (with errors flagged at the first non-ASCII byte) tells you how many bytes of text exist before the next non-text region. The position field in the error message is the byte offset, so you can split the dump at that point.
- Comparison with binary to text. When you have a bit string rather than hex, that converter handles UTF-8 / ASCII / Latin-1; this one is specifically for hex bytes that are already cleanly byte-aligned. Use whichever shape your data is already in.
Why strict 7-bit ASCII matters here
The original ASCII standard, published as ASA X3.4 in 1963, defines exactly 128 code points in the range 0-127 — 95 printable characters plus 33 control codes. Anything above 127 is not ASCII; it is one of several incompatible "extended" encodings (Latin-1, Mac Roman, Windows-1252) or a multi-byte sequence in UTF-8. Treating those bytes as ASCII silently would give wrong characters and hide the encoding mismatch, so this tool refuses bytes above 127 outright and tells you exactly where the first offender lives.
The trade-off is honesty over forgiveness. A more lenient tool would replace bad bytes with a placeholder character (? or U+FFFD), which makes the output prettier but obscures the fact that you are not actually decoding ASCII. For hex dump work — and especially for debugging, forensics, and protocol analysis — knowing that your input contains non-ASCII bytes is usually the important finding.
If your bytes really are UTF-8 text written in hex form, the right route is hex → binary → text (UTF-8 encoding). That path treats the bytes as a UTF-8 stream and decodes multi-byte sequences correctly. If your bytes are Latin-1 or another single-byte legacy encoding, the binary-to-text page has Latin-1 as an explicit choice.
Worked examples
Short conversions show how byte grouping and the strict ASCII rule behave.
Single byte: 41 → A
The hex byte 41 is decimal 65, which is the ASCII code for capital A. Every uppercase letter sits in the 0x41–0x5A range, lowercase in 0x61–0x7A, and digits in 0x30–0x39.
String with punctuation: 48656C6C6F2C20576F726C6421
Twelve bytes, decoded one by one: 48=H, 65=e, 6C=l, 6C=l, 6F=o, 2C=, (comma), 20=(space), 57=W, 6F=o, 72=r, 6C=l, 64=d, 21=! → "Hello, World!". Spaces and punctuation use the same byte boundaries as letters, which is what makes ASCII pleasant to debug — no multi-byte surprises.
Hex dump style with spaces: 48 65 6C 6C 6F
Spaces are stripped before grouping, so the converter sees 48656C6C6F and emits Hello. Many debuggers print bytes with single-space separators by default; you can paste those dumps directly without manual cleanup.
Failure: FF (0xFF is 255, out of ASCII range)
Single-byte input above the ASCII ceiling fails immediately with Byte 0xFF at position 0 is outside ASCII range (0-127). The position number is the byte index, not the hex-character index, so the next byte after a failure is at position 1, 2, and so on. Use that field to locate the first non-ASCII byte in a longer stream.
Common pitfalls
- Non-hex characters. Anything that is not 0-9 / A-F (G–Z, smart quotes, dashes inside MAC addresses, colons inside IPv6 strings) is rejected. The error names the offending character so you can locate the typo. Whitespace and the
0xprefix are the only non-hex tokens that get silently dropped. - Mixed text and hex. Pasting a string like
0x48 'H' 0x65will fail — the single quotes and the literal letterHare not hex. The decoder operates on the hex-only path; convert text to hex via the reverse ASCII to Hex tool if you need to compose a hex stream from a mix. - Cryptographic hash output. SHA-256 / MD5 / UUID values are essentially random byte streams. Most of them contain bytes above 127, so trying to decode them as ASCII will fail near the start. That is expected; hashes are not meant to be turned back into text.
- Confusing
0xFFwithFFas a string. The tool reads0xFFby stripping the0xand parsing the remaining digits as a byte (255). It does not parse the text "FF" as the characters F and F (which would be hex bytes46 46). If you want the latter, route the input through the ASCII to Hex converter first. - Output looks empty. An all-control-byte input (NUL, BEL, BS, etc.) decodes to invisible characters. The character count is non-zero but the visible result appears blank — copy the output and inspect it in a hex viewer, or paste it into the reverse converter to confirm the bytes round-trip.
Frequently asked questions
Why does my hex with bytes above 7F fail?
This tool enforces strict 7-bit ASCII (0-127). Any byte from 0x80 upward — common in UTF-8 multi-byte sequences, Latin-1 extended characters, or binary file data — falls outside the ASCII table and is rejected with the position of the first offending byte. If your input is UTF-8 text, decode it via the binary-to-text route with UTF-8 encoding instead.
What is the difference between this and binary-to-text with ASCII encoding?
Both end up restricted to 7-bit ASCII, but the input shape differs. binary-to-text takes a 0/1 stream and groups every 8 bits into a byte. This tool takes hex digits and groups every 2 hex characters into a byte. Use whichever matches what you have copied — a hex dump (FF 00 41) or a bit string (11111111 00000000 01000001).
Is hex input case-sensitive?
No. ff, FF, Ff, and fF all parse identically. The decoder normalises case before grouping the digits.
How does the tool handle 0x prefixes and spaces?
Both are stripped before parsing — including a 0x in front of each byte (0x48 0x65) or one global 0x at the start (0x4865). Any whitespace, tabs, or newlines are dropped, so a hex dump pasted from a debugger works without manual cleanup.
What does the "odd-length hex" warning mean?
A single hex digit cannot complete a byte on its own. When the cleaned input has an odd number of hex digits, the tool left-pads one zero so the digits realign on byte boundaries — for example, "F" becomes "0F" (which is ASCII 15, a control character). The warning surfaces this so you can verify it was the intended interpretation.
Can I get separators in the output, like a space between characters?
Not directly — the output is a plain decoded string, identical to what you would see if those bytes were written to a text file. If you want grouping, paste the result somewhere with a fixed-width font; the characters themselves carry no visible separator.
My hex input is from a hash function. Why is decoding it gibberish?
Cryptographic hashes (SHA-256, MD5, etc.) output essentially random bytes, and most of those bytes land outside ASCII printable range. They are meant to be compared as hex, not decoded back to text. If you see lots of byte > 127 errors, that is the strong signal the input is not ASCII data.