Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Hexadecimal to Decimal

Hexadecimal to Decimal

Take a U+ code point to the integer HTML entities and spreadsheet functions expect, with a chart covering ASCII through emoji and their UTF-8 sizes.

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.

Each place is worth sixteen times the one to its right: for 20AC that is 2 × 4096 + 0 × 256 + 10 × 16 + 12 = 8364. So the euro sign can be written € as well as €.

Who Asks for the Decimal Form

Markup and Template Escapes

A numeric character reference in HTML or XML accepts either notation, and plenty of legacy templates were written with the decimal one.

Functions That Count in Integers

Spreadsheet UNICHAR, SQL character functions and many scripting helpers take a plain number, not a U+ label.

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

1

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.

2

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.

3

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.

Identifying a stray number: type the integer into the lower field and the hex code point appears above, ready to look up in a character chart. Swap opens the decimal-first page with the value in place.

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.

CharacterCode pointDecimalReferenceUTF-8 bytes
AU+004165A1
©U+00A9169©2
U+20148212—3
U+20AC8364€3
U+26059733★3
😀U+1F600128512😀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.

0123456789ABCDEFabcdef
0x
0123456789

Code Points Worth Knowing

0041 = 65
00A9 = 169
2014 = 8212
20AC = 8364
2605 = 9733
1F600 = 128512

Hexadecimal (Base-16)

The notation every character chart uses, four to six digits behind a U+ label.

Decimal (Base-10)

The integer that markup references and spreadsheet character functions accept, with no prefix at all.

Paste U+20AC whole, the U and plus never enter the field
U+20AC is 8364, so € is the euro sign
Decimal output is spaced in threes and copies without spaces
A code point is not the same as its UTF-8 bytes
Want to learn more? Read documentation →
1/5
Start typing to search...
Searching...
No results found
Try searching with different keywords