TestBench.tools

Hex to ASCII Converter

Convert hex byte strings to readable ASCII text.

2 bytes

ASCII text
Hi

Non-printable bytes are shown as “.”

Need the other direction? ASCII to Hex Converter →

This tool turns a hex byte string into readable ASCII text instantly: paste 48 69 and you get Hi. It accepts spaced, packed, comma-separated and 0x-prefixed input, flags the exact position of any invalid character, and renders non-printable bytes as dots — handy when fishing readable strings out of a serial capture or register dump.

How it works

Each pair of hex digits is one byte, and printable ASCII bytes map directly to characters: 0x48 is H, 0x69 is i. The printable range runs from 0x20 (space) to 0x7E (tilde); anything outside — control characters like CR (0x0D) and LF (0x0A), or bytes above 0x7F — is shown as a dot so the output length still matches the byte count.

Worked example

hex  : 48 69
ascii: Hi

hex  : 4F 4B 0D 0A
ascii: OK..  (CR and LF are non-printable)

Parameters

ParameterValueNotes
Inputhex bytesspaces, commas, dashes, 0x prefixes allowed
OutputASCII textone character per byte
Printable range0x20 – 0x7Eothers render as “.”
Encodingsingle-byte ASCIInot UTF-8 aware

Python implementation

Python
# Hex string -> ASCII, non-printables as "."
def hex_to_ascii(s: str) -> str:
    data = bytes.fromhex(s.replace(" ", ""))
    return "".join(chr(b) if 0x20 <= b <= 0x7E else "." for b in data)

assert hex_to_ascii("48 69") == "Hi"

FAQ

Which input formats are accepted?

Spaced pairs (48 69), packed strings (4869), comma or dash separated bytes, and 0x-prefixed values (0x48 0x69) all parse. Invalid characters are reported with their exact position so you can fix the paste.

What happens to bytes that are not printable characters?

Bytes outside the printable ASCII range 0x20–0x7E are shown as a dot, the same convention hex editors use. The byte count below the input tells you how many bytes were actually parsed.

Why do I see dots where I expected Korean or accented text?

This tool decodes plain single-byte ASCII only. Multi-byte encodings such as UTF-8 will show their constituent bytes as dots when they fall outside the printable ASCII range.

Can I convert in the other direction?

Yes — use the companion ASCII to Hex page, linked below the tool, which converts text into spaced uppercase hex bytes.

Is my data uploaded?

No. Conversion runs entirely in your browser.

Related tools