1. Home
  2. Developer
  3. Text ↔ Decimal Converter

Text ↔ Decimal Converter

Turn text into a list of decimal numbers, and numbers back into text.

For every format and option in one place, use Encoder and Decoder →

Runs in your browser · No upload
Decimal result
72 101 108 108 111 44 32 119 111 114 108 100 33
Characters
13
Numbers
13
Decimal per character
Decimal per character
CharCode pointUTF-8UTF-16
H727272
e101101101
l108108108
l108108108
o111111111
,444444
␠323232
w119119119
o111111111
r114114114
l108108108
d100100100
!333333

Conversion happens in your browser; nothing you type is uploaded.

How to use

  1. 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.
  2. Choose what the numbers are. The default, Unicode code points, gives one number per character. UTF-8 bytes gives one number per stored byte.
  3. Pick a separator (space, comma, new line or semicolon) and copy. Pad with leading zeros keeps widths even, as in 072 105.
  4. To decode, switch to Decimal → text and paste numbers. They can be split by spaces, commas, semicolons or new lines.
  5. 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’s chr(), 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 156 as 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.

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.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.