Unicode Code Points in the Numbers HTML Understands
Character charts, font tables and encoding standards all name a character the same way: U+20AC, a code point written in base-16. HTML numeric references, spreadsheet functions and a good number of database queries want that same code point as an ordinary integer. This page walks the value from one notation to the other.
€ as well as €.Who Asks for the Decimal Form
Markup and Template Escapes
Functions That Count in Integers
Reading in the other direction is just as common: a stray integer in a data export is much easier to identify once you know which code point it names.
Getting a Decimal Code Point from U+ Notation
Paste the code point as it is written
You can paste U+20AC whole. The U and the plus sign are not hex characters, so they never enter the field and 20AC is what gets converted.
Read the integer below
Long values are spaced in threes, the same way a thousands separator would fall, so a five-figure code point stays readable.
Wrap it in the reference syntax
Copy the plain number — no prefix is added on the decimal side — then put it between &# and a semicolon for markup.
Code Points, Decimal Entities and Byte Counts
These six characters span the ranges you meet in practice: plain ASCII, the Latin-1 supplement, punctuation and symbols, and an emoji beyond the basic plane. The last column shows how many bytes UTF-8 spends on each.
| Character | Code point | Decimal | Reference | UTF-8 bytes |
|---|---|---|---|---|
| A | U+0041 | 65 | A | 1 |
| © | U+00A9 | 169 | © | 2 |
| — | U+2014 | 8212 | — | 3 |
| € | U+20AC | 8364 | € | 3 |
| ★ | U+2605 | 9733 | ★ | 3 |
| 😀 | U+1F600 | 128512 | 😀 | 4 |
U+ Notation Cleans Itself Up
Non-hex characters are dropped as you type, so a code point pasted straight from a chart converts without editing.
Thousands Spacing on the Result
Decimal output is grouped in threes for reading; the copy button hands over the digits with the spaces removed.
Astral Planes Included
Five and six-digit code points above U+FFFF convert exactly, so emoji and historic scripts are no harder than ASCII.
Character Encoding Questions
Is a code point the same as its UTF-8 bytes?
No, and mixing them up causes real bugs. The euro sign is code point 8364, but on disk UTF-8 stores it as the three bytes E2 82 AC. Convert a code point when you are writing an escape, not when you are counting bytes.
Which reference form should I write in HTML?
Both work: © and © produce the same character. Hex matches the standards documents, decimal matches older tooling — pick one and keep a file consistent.
Why do some code points need six digits?
Four hex digits stop at U+FFFF, which is 65535 characters. Everything above that — emoji, musical notation, older scripts — lives in higher planes and needs five or six digits.
What are surrogate values doing in my JavaScript?
JavaScript strings store characters above U+FFFF as a pair from the D800 to DFFF range. Converting one half alone gives a number that names no character, so work from the full code point instead.
Does this help with a colour code as well?
It converts any hex value, but a colour is three separate channels. Feed the pairs one at a time rather than the whole six characters, otherwise you get the single large number they spell together.
No comments yet. Be the first to comment!