Look up Unicode and ASCII character hex codes
How symbol-to-hex lookups work, what a hex code tells you, how tab, 0x02 and 0x1F behave, and when the result stays usable after copying or sharing.
Converting a symbol to hex is usually the first step in diagnosing a text problem: a character that won't display, a parser error, a search that misses an obvious match, or styled text that behaves strangely after pasting. This review covers what a hex lookup reveals, where it can mislead, and which hex output belongs in documentation and which belongs in a shared message.
Is a hex lookup suitable for your purpose?
Use a hex lookup when you need to know exactly which character is present. Typical cases are telling a tab from spaces, finding an invisible control character, confirming that a letter is Latin rather than Cyrillic, or checking which bytes a file really contains. Two things look identical on screen only when their code points differ, and the hex value is the most direct way to see that difference.
The decisive tradeoff is that hex is precise for machines and opaque for people. A value like U+0430 settles a question for a developer, but it tells a general reader nothing. Use plain text when the goal is communication rather than diagnosis: in messages, published copy, or anything a screen reader user or a search engine needs to process as words. Put hex codes beside the plain text, in a note, code block or table, and never in its place.
What a hex lookup actually shows
A hex lookup does not change your text. It produces a second representation of the stored characters. That makes it different from transformations such as reversal, mirroring or Unicode "font" styling, which do replace the characters you type. CSS styling and bidirectional display also differ: they change how text appears without touching the stored characters. A hex lookup reports what is stored, not what is displayed. For that reason it is a good way to check what those other transformations really did.
"Hex code" can mean two different things, and converters do not always say which one they show:
- Code point: the character's number in Unicode, written as U+ followed by hex digits, for example U+0041 for A or U+1F600 for 😀. This value does not depend on encoding.
- Encoded bytes: the bytes that store the character in a particular encoding. In UTF-8, A is the single byte 41, but é (U+00E9) becomes the two bytes C3 A9 and 😀 becomes the four bytes F0 9F 98 80. In UTF-16, the same emoji is the surrogate pair D83D DE00.
For characters from U+0000 to U+007F, which is the ASCII range, the code point and the UTF-8 byte are the same number. That is why ASCII lookups rarely cause confusion. Outside that range, check whether a Unicode hex converter shows code points or bytes, and which encoding it assumes, before you copy its output into code or a bug report.
Reference values for common lookups
| Character | Name or alias | Code point | UTF-8 bytes |
| Tab | CHARACTER TABULATION (HT) | U+0009 | 09 |
| Line feed | LINE FEED (LF) | U+000A | 0A |
| Carriage return | CARRIAGE RETURN (CR) | U+000D | 0D |
| Space | SPACE | U+0020 | 20 |
| No-break space | NO-BREAK SPACE | U+00A0 | C2 A0 |
| Zero-width space | ZERO WIDTH SPACE | U+200B | E2 80 8B |
| A | LATIN CAPITAL LETTER A | U+0041 | 41 |
| a | LATIN SMALL LETTER A | U+0061 | 61 |
| а (Cyrillic) | CYRILLIC SMALL LETTER A | U+0430 | D0 B0 |
| Invisible control | START OF TEXT (STX) | U+0002 | 02 |
| Invisible control | UNIT SEPARATOR (US) | U+001F | 1F |
| é (precomposed) | LATIN SMALL LETTER E WITH ACUTE | U+00E9 | C3 A9 |
| € | EURO SIGN | U+20AC | E2 82 AC |
| 𝐀 | MATHEMATICAL BOLD CAPITAL A | U+1D400 | F0 9D 90 80 |
| 😀 | GRINNING FACE | U+1F600 | F0 9F 98 80 |
The tab character
The tab's hex code is 09 (decimal 9). In source code it usually appears as the escape \t, in HTML as , and in Unicode notation as U+0009. If a lookup of what looks like a tab shows 20 20 20 20 instead, your editor or the paste destination has replaced the tab with spaces.
Characters 0x02 and 0x1F
Searches like "0x2 character" or "what character is hexadecimal value 0x1f" usually come from someone who has found an invisible character in their data. Both are C0 control characters from the original ASCII set and have no visible glyph. U+0002 is START OF TEXT, a transmission-framing marker. U+001F is UNIT SEPARATOR, intended to separate fields in data records. Today they most often turn up as stray bytes from legacy systems, binary data mixed into text, or export tools that use them as delimiters.
The phrase "hexadecimal value 0x1F" commonly appears in XML parser error messages. That fits the XML 1.0 specification, which forbids C0 control characters other than tab, line feed and carriage return, even when written as character references. If you see that error, the usual fix is to find the character, using a hex lookup or a byte dump, and remove or replace it at the source. Escaping it does not help.
Checking characters yourself
Most programming languages can do the lookup locally, so the text never leaves your machine. In Python:
>>> hex(ord('A'))
'0x41'
>>> hex(ord('\t'))
'0x9'
>>> 'é'.encode('utf-8').hex(' ')
'c3 a9'
>>> [hex(ord(c)) for c in 'e\u0301']
['0x65', '0x301']
In JavaScript, use codePointAt rather than charCodeAt for anything outside the Basic Multilingual Plane. charCodeAt returns only half of a surrogate pair:
'😀'.codePointAt(0).toString(16) // '1f600'
'😀'.charCodeAt(0).toString(16) // 'd83d'
'😀'.length // 2
On the command line, piping text through a byte-dump tool such as xxd or od shows the encoded bytes. That is the right view when you are investigating a file, as opposed to a single character.
Combining marks and multi-code-point emoji
One visible character does not always map to one hex value. The Python example above shows é stored as two code points: e (U+0065) followed by COMBINING ACUTE ACCENT (U+0301). It looks identical to the precomposed U+00E9 but compares as different text unless both are normalized. Emoji can be longer. The family emoji 👨👩👧 is five code points: three people joined by two ZERO WIDTH JOINER characters (U+1F468 U+200D U+1F469 U+200D U+1F467). Flag emoji are pairs of regional indicator symbols.
A good converter lists every code point. A poor one shows only the first code point, or splits surrogate pairs into meaningless halves. Test any tool with a combining accent and a ZWJ emoji before relying on it. The same check applies to text reversal tools: reversing code points, rather than whole grapheme clusters, detaches accents from their letters and breaks joined emoji apart.
Using hex lookups to audit styled or mirrored text
Unicode "font" generators do not apply a font. They replace letters with other characters, such as mathematical alphanumeric symbols. A lookup of bold-looking 𝐀 returns U+1D400, not U+0041. This confirms that the styled text is no longer the letter A as far as search, spell-check and string matching are concerned. Upside-down and mirrored text generators similarly substitute lookalike characters from other scripts and symbol blocks. A hex lookup also helps with security review, because it exposes confusable characters, such as Cyrillic а in place of Latin a, that are impossible to spot by eye.
Text styled or mirrored with CSS, or reordered by bidirectional controls, keeps its original characters. A lookup on copied text then shows ordinary letters, plus any invisible directional marks such as U+200F RIGHT-TO-LEFT MARK or U+202E RIGHT-TO-LEFT OVERRIDE. Their presence explains text that displays in one order but copies, searches or edits in another.
Will the result survive copying and sharing?
Hex strings are plain ASCII, so they copy reliably almost anywhere. The difficulty lies with the characters they describe:
- Control characters such as U+0002 and U+001F are often stripped, replaced or rejected by editors, web forms and parsers. Whether a given destination keeps them has to be tested in that destination.
- Tabs are frequently converted to spaces by editors, chat clients and web text fields. Check the hex of the pasted result, not the original.
- Zero-width and directional characters usually survive copying while staying invisible. This is useful for diagnosis but risky in usernames, links and code.
- Precomposed and decomposed accents may be normalized by the destination, so the hex values after pasting can differ from the source.
For accessibility, raw hex in running text is hard to follow. A screen reader will read it as letters and digits, not as the character it describes, and exact announcement behavior varies by product and settings. No assistive-technology testing was supplied for this review, so treat specific screen reader behavior as unverified. A practical rule: show the character, give its name in words, and put the hex value in a code block or table. Anyone sharing text styled with substituted characters should also provide a plain-text version, because substituted characters may be skipped, mispronounced or read as symbol names.
Online converters and sensitive text
No specific converter was evaluated here, and its interface or marketing cannot tell you how a tool handles the text you paste. If the text contains credentials, personal data or proprietary content, use a local method, such as the language built-ins or byte-dump tools shown above. Otherwise, rely only on what a tool's documented privacy terms actually state.
Gaps in this review
The code points, encodings and XML rules above are documented standard behavior. This review includes no tests of how particular apps, browsers, messaging services or screen readers treat control characters, tabs or substituted characters on paste. Those outcomes vary by environment, and one successful rendering does not show that others will match. Verify in the destination that matters to you, by pasting the text there and running a hex lookup on the result.