Read Unicode Code Points as Decimal Values
How Unicode-to-decimal conversion works, what the numbers do and do not tell you, and when a decimal readout is the right inspection tool versus plain text or hex.
Converting Unicode text to decimal values is an inspection step, not a styling effect. It replaces each character with the number Unicode assigns to it, so you can see exactly what is stored. It does not reverse, mirror, or restyle anything. This review covers what the conversion shows, where it misleads, and when you should keep plain text instead.
Is a decimal readout suitable for your use?
A decimal readout is a good fit when you need to identify characters precisely. Typical cases are spotting look-alike letters, finding invisible characters, checking whether an accent is one character or two, and producing decimal HTML character references. Its main benefit is that nothing can hide: two strings that look identical but differ in storage will produce different numbers.
The tradeoff is that the output stops being readable text. A row of numbers works for diagnosis and for passing to code. It does not work as content for people to read, search, or edit. If the goal is to communicate a message, keep plain text and use the decimal view only as a side check. Hexadecimal is also often the better choice for documentation and specification lookups, because Unicode charts and most references write code points in hex with a U+ prefix.
What the conversion actually changes
Every Unicode character has a code point, a number from 0 to 1,114,111 (U+10FFFF in hex). Conversion to decimal writes that number in base 10 instead of displaying the glyph. The stored text is not altered. You are seeing a different notation for the same data, much as a hex editor shows a file's bytes. For example, the letter A is U+0041, which is 65 in decimal, and é as a single precomposed character is U+00E9, or 233.
| Character | Hex code point(s) | Decimal value(s) | Note |
| A | U+0041 | 65 | Basic Latin |
| é (precomposed) | U+00E9 | 233 | One code point |
| é (decomposed) | U+0065 U+0301 | 101 769 | Letter plus combining acute accent |
| a (Latin) | U+0061 | 97 | Looks like the Cyrillic letter below |
| а (Cyrillic) | U+0430 | 1072 | Visually similar, different character |
| 𝐀 (mathematical bold) | U+1D400 | 119808 | Often sold as a 'bold font' |
| 😀 | U+1F600 | 128512 | One code point, outside the 16-bit range |
| 👩💻 | U+1F469 U+200D U+1F4BB | 128105 8205 128187 | Three code points joined by a zero-width joiner |
The table shows why the numbers are useful. The two forms of é look the same but produce different sequences. The Latin and Cyrillic a look alike but have different values. A 'bold' letter copied from a fancy-text generator turns out to be a separate mathematical symbol, not a formatted A. What a person sees as one character can map to several code points, as with combining accents and emoji joined by U+200D (8205).
Code points, code units and bytes are different numbers
The most common source of confusion is a tool or function that reports something other than code points while still calling the result 'Unicode decimal.' Three different numbers can appear:
- Code points: the Unicode number for each character. 😀 is 128512.
- UTF-16 code units: what JavaScript's charCodeAt and many older APIs return. Characters above 65,535 are split into a surrogate pair, so 😀 becomes 55357 56832.
- UTF-8 bytes: the stored byte values. é (U+00E9) becomes 195 169.
If a converter shows two numbers for an emoji that should be a single code point, or values between 55296 and 57343, you are probably looking at UTF-16 code units. If plain accented letters come out as pairs of values between 128 and 255, you are probably looking at UTF-8 bytes. Check which one a tool reports before relying on its output. No specific tool was tested for this article, so confirm this yourself with a known character such as 😀.
In code, use functions that iterate by code point. In Python, ord() returns the code point. In JavaScript, iterate the string, for example with for...of or the spread operator, and call codePointAt(0) on each piece.
# Python
text = "é😀"
print([ord(ch) for ch in text]) # [233, 128512]
// JavaScript
const text = "é😀";
console.log([...text].map(ch => ch.codePointAt(0))); // [233, 128512]
console.log(text.charCodeAt(1)); // 55357 (a UTF-16 code unit, not the code point)
These outputs assume é is stored in precomposed form. If the source is decomposed, Python will print 101 and 769 in place of 233. That is not a bug. It shows that the string is stored differently.
Normalization changes the numbers, not the appearance
Unicode normalization forms convert between precomposed and decomposed representations. NFC favors single precomposed characters where they exist, and NFD splits them into base letters plus combining marks. Text copied from different systems can arrive in either form. A decimal readout is one of the clearest ways to see which form you have. It is also a reminder that string comparison, search, and deduplication can fail on text that looks identical unless both sides are normalized the same way first.
Will the result stay usable after copying or sharing?
The decimal output is ordinary ASCII digits and separators, so it survives copy and paste, email, and chat without encoding problems. That makes it a reliable way to report a character problem to someone else: send the numbers, and they can reconstruct exactly what you saw.
The cost is readability. A screen reader will read the digits as numbers, which conveys nothing about the original wording. Search engines and site search will index the numbers, not the words. Editing the output by hand is error-prone. Whenever the decimal form appears in front of readers, such as in documentation or a support reply, include the plain-text original or a description next to it.
Decimal HTML character references are a separate case. Writing é in HTML source tells the browser to display é, so readers and assistive technology get the character, not the number. This is a legitimate use of decimal values, though in UTF-8 documents it is usually simpler to type the character directly. The hex form, é, works the same way.
Limits and gaps
- A code point identifies a character, not how it will look. Rendering depends on the fonts available on the reader's system, which the numbers cannot predict.
- One visible character can be several code points. Counting decimal values does not count what a reader perceives as letters or emoji.
- The numbers do not tell you a character's name or category. You still need a Unicode reference or a tool that looks up character properties.
- No specific converter, browser, or screen reader was tested for this article. Claims about how a particular product behaves should be verified against its documentation or with a known test string.
- Nothing about a converter's appearance indicates how it handles pasted input. If the text is sensitive, prefer converting locally in code over pasting it into an unfamiliar web page.
Bottom line
Reading Unicode as decimal values is a precise, low-risk way to find out what a string really contains. It is especially useful for look-alike characters, combining marks, invisible joiners, and 'fancy font' substitutions. Make sure your tool reports code points rather than UTF-16 units or UTF-8 bytes, and expect normalization to change the results. Use the numbers for diagnosis and data exchange, and keep plain text wherever people need to read, search, or edit the content.