Inspect Text to Find Unicode Code Points

How turning a word into Unicode code points works, what inspection reveals and hides, and when a code point listing helps or plain text works better.

Converting a word to Unicode usually means listing the code points behind each visible character, such as U+0041 for a capital A. This kind of inspection is a diagnostic step. It reports what is stored in a piece of text so you can judge whether a transformation, a copy and paste, or a styled font kept the meaning and usability you need.

Is code point inspection suitable for your use?

Inspection is a good fit when you need certainty about what a string contains. Common examples are debugging a search or comparison that fails, spotting lookalike letters from another script, finding invisible characters, checking whether "fancy font" text is really substituted symbols, and preparing escape sequences for code or markup.

The main benefit is precision. Two strings that look identical on screen can be told apart by their code points. The main tradeoff is readability. A list like U+0043 U+0061 U+0066 U+00E9 means nothing to most readers, and the number of code points often differs from the number of characters a person sees.

Plain text is better whenever the goal is communication rather than diagnosis. Keep the original readable text for anything people will read, search or edit. Use the code point listing as a supporting record, for example in a bug report, a style guide or a code comment.

What inspection changes, and what it does not

Pure inspection changes nothing in the stored text. It reads each character and reports its code point, and some tools also report its official Unicode name, category or encoded bytes. This is different from several transformations that are also loosely called "word to Unicode."

  • Code point listing: reports U+ values. The original text is unchanged.
  • Escape conversion: rewrites characters as notation such as \u00E9 or é. The stored characters change, but a program or browser decodes them back to the same characters.
  • Unicode "font" substitution: replaces ordinary letters with different characters, such as Mathematical Bold letters. This changes the stored text permanently. It is not a font in the typographic sense.
  • CSS or word-processor formatting: changes only how text is displayed. The underlying characters stay the same, and inspection shows the plain letters.
  • Bidirectional display: right-to-left text is stored in logical order and arranged visually by the renderer. Inspection shows the stored order, which can differ from what appears on screen.

That last distinction matters for reversed or mirrored text. If a word looks reversed because of a right-to-left override control character (U+202E), inspection reveals the control character and the letters in their original order. If the letters were actually reordered, inspection shows the new order with no control character.

Code points are not always characters

Unicode assigns numbers to code points, but what a reader perceives as one character, called a grapheme cluster, can be built from several code points. Any inspection result, and any reversal built on it, has to account for this.

Visible text | Possible code points | Note
é | U+00E9 | Precomposed form, one code point
é | U+0065 U+0301 | Letter e plus a combining acute accent, two code points that render identically
𝐀 | U+1D400 | Mathematical Bold Capital A, not a bold-styled A
а | U+0430 | Cyrillic small a, visually similar to Latin a (U+0061)
❤️ | U+2764 U+FE0F | Heart plus a variation selector requesting emoji presentation
Flag emoji | Two regional indicator symbols | Each flag is a pair of code points

Emoji with skin tone modifiers, and family or profession emoji joined with the zero width joiner (U+200D), can contain four or more code points while appearing as one symbol. A tool that reverses text code point by code point will separate combining accents from their letters and break these sequences apart. Reversal that preserves meaning has to operate on grapheme clusters instead.

Clues that inspection reveals

  • Styled "font" text: code points in the Mathematical Alphanumeric Symbols block (U+1D400 to U+1D7FF). Some letters come from the Letterlike Symbols block instead. Script capital B, for example, is U+212C, because it was encoded before the mathematical block existed.
  • Lookalike letters: Cyrillic or Greek code points mixed into otherwise Latin words.
  • Invisible characters: zero width space (U+200B), no-break space (U+00A0), byte order mark (U+FEFF) and directional marks such as U+200F.
  • Hidden reordering: directional override and isolate controls in the U+202A to U+202E and U+2066 to U+2069 ranges.
  • Normalization differences: precomposed and decomposed accents that make identical-looking words compare as unequal.

Will the result stay usable after copying or sharing?

A code point listing written as U+XXXX is plain ASCII text, so it copies cleanly almost anywhere. The risk lies with the characters being inspected. Destinations may normalize text, strip invisible characters or substitute fonts, so the code points you inspected before pasting may not be the ones that arrive. To verify, inspect the text again after it reaches its destination, rather than assuming it survived unchanged.

Search and editing are affected by substitution, not by inspection. Text made of Mathematical Bold letters will not match a search for the ordinary word unless the system applies compatibility normalization (NFKC), which maps those letters back to plain ones. Spell checkers and find-and-replace tools may also treat such text as unfamiliar symbols.

Screen reader behavior with substituted characters varies by product, version, language and verbosity settings. Some may announce long character names, and some may skip or misread the text. No scoped test results were supplied for any specific assistive technology, so this article does not claim how a particular screen reader handles these characters. If accessibility matters, test with the screen readers your audience uses and provide a plain-text equivalent. A raw code point list is not an accessible substitute either. If you share one, pair it with character names and the readable original.

How to inspect a word yourself

Useful search terms include "Unicode code point lookup," "text to code points," "Unicode character inspector," "Unicode escape converter" and "UTF-8 byte decoder." No specific online tool was reviewed for this article, including its accuracy or data handling. Avoid pasting sensitive text into a web tool whose privacy practices you have not confirmed. Local methods keep the text on your own machine.

In Python, iterating over a string yields code points, and the standard unicodedata module supplies official names:

import unicodedata

text = "Café"
for ch in text:
    print(f"U+{ord(ch):04X}  {ch}  {unicodedata.name(ch, '<unnamed>')}")

In JavaScript, a for...of loop iterates by code point, while the length property counts UTF-16 code units. That is why "𝐀".length returns 2:

for (const ch of "Café") {
  const hex = ch.codePointAt(0).toString(16).toUpperCase().padStart(4, "0");
  console.log(`U+${hex}`, ch);
}

To count or reverse perceived characters instead of code points, use grapheme segmentation, such as Intl.Segmenter in JavaScript or a library that supports extended grapheme clusters in your language.

Microsoft documents a shortcut in Word for Windows. You place the cursor after a character and press Alt+X to toggle between the character and its hexadecimal code. This was not verified against current versions for this article, and it may not apply to other platforms, so check it in your own copy.

Reading the notation you get back

Format | Example for é | Example for 𝐀 | Where it is used
Unicode notation | U+00E9 | U+1D400 | Documentation and character references
JSON / JavaScript escape | \u00E9 | \uD835\uDC00 | Characters above U+FFFF need a surrogate pair
Modern JavaScript escape | \u{E9} | \u{1D400} | ES2015 and later
Python escape | \u00E9 | \U0001D400 | Uppercase U takes eight hex digits
HTML numeric reference | é or é | 𝐀 | Web markup
UTF-8 bytes | C3 A9 | F0 9D 90 80 | Files and network data

All of these forms identify the same code point. Choose the one your destination expects, and keep the readable text alongside it wherever people will see the result.