Decimal converter

Convert text into decimal character codes (H = 72) and decimal codes back to text. Useful for programming, encoding and puzzles. Free converter.

Convert text to decimal character codes

Every character is stored as one or more bytes, and each byte is a number. In decimal (base 10, the numbers we use every day), H is 72, i is 105 and ! is 33. This tool converts text to those decimal codes and back again.

Choose To decimal to see the numbers behind your text, or To text to turn a list of numbers into readable characters.

Decimal codes appear in programming (for example JavaScript's charCodeAt and Python's ord()), in HTML numeric entities like H, and in data formats that store characters as numbers.

How to use the decimal converter

  1. Paste your text or decimal codes.
  2. Choose To decimal or To text.
  3. Submit to convert.
  4. Copy the result.

Examples

Text to decimal

Input: Hi!

Output: 72 105 33

Digits are characters

Input: 2026

Output: 50 48 50 54

The tool converts characters, not numbers. "2" is character 50, so this isn't the number 2026 in another base.

Decimal to text

Input: 77 121

Output: My

An emoji

Input: 😀

Output: 240 159 152 128

Four numbers, one per UTF-8 byte.

Common uses

  • Checking the character codes your code produces.
  • Writing HTML numeric entities.
  • Decoding number-based puzzles and messages.
  • Teaching how text is stored.
  • Finding invisible characters in data.
  • Finding which invisible character is breaking a form or spreadsheet: a tab shows as 9, a line feed as 10 and a non-breaking space as 194 160.
  • Teaching how text is stored as numbers.
  • Creating simple puzzles and escape-room codes.

Tips and things to know

  • Separate codes with single spaces when converting back to text. Commas aren't understood.
  • The same character in other bases: use the binary, hex or octal converters.
  • For named HTML entities like &, use the HTML entity converter.

Edge cases and limitations

  • To convert a number between bases (for example 255 to FF), use a calculator; this tool always works character by character.
  • Separate codes with single spaces; commas and line breaks aren't treated as separators.
  • For HTML numeric entities you need the Unicode code point (é is é), not the UTF-8 bytes this tool shows for characters beyond 127.
  • The text output for codes 128–255 depends on the bytes forming valid UTF-8; single stray bytes show as broken characters.

Frequently asked questions

What is the decimal code of a space?

32.

Is decimal the same as ASCII?

For the first 128 characters, the decimal code is the ASCII code. Beyond that, this tool shows the UTF-8 byte values, two to four numbers per character, rather than a single Unicode code point.

How do I write a character in HTML using decimal?

Use &#code; for example © produces the © symbol.

Can I convert emoji to decimal?

Yes, but you'll get its UTF-8 bytes: 😀 becomes 240 159 152 128. Its single Unicode code point, 128512, is what you'd use in an HTML entity (😀).

Related tools

Similar tools

Binary converter

Convert text to binary code (Hi = 1001000 1101001) and binary back to text. Learn how computers store characters. Free online binary translator.

Hex converter

Convert text to hexadecimal (hex) code and hex back to readable text. Handy for debugging, encoding and learning. Free online text to hex converter.

Ascii converter

Convert text to ASCII character codes and ASCII codes back to text. Look up the number behind every letter and symbol. Free online ASCII converter.

Popular free tools