How can I tell whether a number shown in hex represents a byte or a character?
Quick answer
A hex value is a number written in base 16; it does not identify a character by itself. If it is shown as a byte, it represents a numeric value from the data. To interpret bytes as text, you need the text encoding and, for some sequences, surrounding bytes and sequence boundaries. Check whether the display labels the value as a byte, code unit, code point, or decoded text before drawing conclusions. [S1]
The question, the details, the next step.
A practical checklist
Record the hex values exactly as displayed, including their order.
Check whether the source labels them as bytes, code units, or decoded text.
Confirm that the data is intended to represent text rather than other binary data.
Find the encoding and obtain the full sequence, not just an isolated value.
Mark the interpretation as unknown if encoding or sequence boundaries are missing.
A few more useful answers
Can one byte always be read as one character?
No. A byte value alone does not identify a character. Text interpretation depends on the encoding, and some text sequences use multiple bytes. [S1]
What if my hex viewer already displays letters beside the values?
Treat those letters as the viewer’s decoded-text display. Check which encoding or interpretation it uses; the displayed text does not, by itself, prove that the source bytes were text or that the chosen interpretation is correct.
Sources
References used for this guide.
- [S1] Microsoft Learn: Introduction to character encoding in .NET learn.microsoft.com · Checked
