How to use
- In Text → decimal, type or paste text and a list of numbers appears. A sample is already filled in, so you see a result when the page opens.
- Choose what the numbers are. The default, Unicode code points, gives one number per character. UTF-8 bytes gives one number per stored byte.
- Pick a separator (space, comma, new line or semicolon) and copy. Pad with leading zeros keeps widths even, as in
072 105. - To decode, switch to Decimal → text and paste numbers. They can be split by spaces, commas, semicolons or new lines.
- The table below lists each character’s code point, UTF-8 bytes and UTF-16 code units in decimal.
How the base changes the numbers
Hello gives 72 101 108 108 111 in every mode, because English letters and digits sit in the ASCII range (0 to 127) where all three bases agree. Differences show up with Hangul and emoji.
| Input | Numbers are | Decimal |
|---|---|---|
| 한 | code point | 54620 |
| 한 | UTF-8 bytes | 237 149 156 |
| 한 | UTF-16 units | 54620 |
| 😀 | code point | 128512 |
| 😀 | UTF-8 bytes | 240 159 152 128 |
| 😀 | UTF-16 units | 55357 56832 |
- Code point: the character’s number in the Unicode table. It goes straight into
String.fromCodePoint()or Python’schr(), and it is the number used in HTML references such as한. - UTF-8 bytes: the values that are actually stored in files or sent over a network, always 0 to 255.
- UTF-16 code units: what JavaScript’s
charCodeAt()returns. Emoji are split into two.
Decoding caveats
- Numbers must be read with the same base they were written in. Reading
237 149 156as code points givesíplus two invisible control characters, while reading them as UTF-8 bytes gives한. If the result looks wrong, switch the base. - UTF-8 bytes mode rejects values above 255, and code point mode rejects values above 1,114,111 (U+10FFFF).
- A lone surrogate value (55357 on its own) cannot be a character, so it shows as
�with a warning. - Negative signs and decimal points are not accepted.
Related tools
- Text to Hex: the same bytes in hex, with UTF-8, UTF-16 and EUC-KR.
- Text to ASCII: ASCII codes with a reference table.
- Text ↔ Binary Converter: text as binary bytes.
- Unicode Converter: notations such as
U+D55Cand한.
FAQ
How do I convert text to numbers?
Computers store every character as a number. This tool shows that number in decimal: A is 65, a is 97 and 한 is 54620.
What is the difference between a code point and UTF-8 bytes?
A code point is one number for the character. UTF-8 bytes are the one to four bytes used to store that number. For English they match, while one Hangul character is one code point but three bytes.
I decoded decimal numbers and got strange characters.
Usually the base is wrong. A run of values up to 255 is probably UTF-8 bytes, while larger values point to code points.
Is this the same as turning letters into 1 to 26?
No. That is the A1Z26 cipher. This tool deals with the character numbers that computers use (ASCII and Unicode).
Is my text uploaded?
No. Conversion happens in your browser and nothing is sent to a server.