Developer tools

Text to ASCII Codes

Text to ASCII Code Converter

Convert text to decimal ASCII / Unicode codes and codes back to text.

About this tool

About Text to ASCII Codes

Get the decimal code of every character in a string, the same number JavaScript's charCodeAt, Python's ord() or C's (int) cast gives you. H is 72, e is 101, a space is 32. Beyond plain ASCII the tool keeps working: by default it shows Unicode code points, so é is 233, ₹ is 8377 and an emoji is a single number like 128512 rather than two surrogate halves. Switch Values are to UTF-8 bytes to see the decimal bytes a file or network packet actually contains, where é becomes 195 169. Separate codes with spaces, commas or new lines, which makes the output easy to paste into an array literal, and in UTF-8 bytes mode turn on padding for fixed-width three-digit codes. The reverse direction reads decimal codes separated by almost anything, including HTML-style H references, and tells you which value is out of range. It is useful for programming exercises, debugging odd characters and puzzles, and it runs in your browser.

Built and maintained by Abhi JainUpdated

How to Convert Text to ASCII Codes

  1. 1

    Choose the direction

    Pick Text → ASCII codes, or ASCII codes → Text to decode numbers.

  2. 2

    Pick the values

    Keep Code points for one number per character, or choose UTF-8 bytes. Set the Separator.

  3. 3

    Type and copy

    Type or paste text and copy the list of codes, or click Swap to turn them back into text.

Text to ASCII Codes: questions and answers

What is the ASCII code of A?

65. Lowercase a is 97, the digit 0 is 48 and a space is 32. Upper and lower case letters are always 32 apart.

Does ASCII include é or emoji?

No. ASCII covers only codes 0–127. Characters such as é (233) or emoji are Unicode code points; this tool shows those numbers in Code points mode, or their UTF-8 bytes in UTF-8 bytes mode.

What is the difference between charCodeAt and codePointAt?

charCodeAt returns UTF-16 code units, so an emoji gives two numbers (a surrogate pair). codePointAt returns the full Unicode code point, which is what this tool shows in Code points mode.

What is extended ASCII?

Codes 128–255 in older 8-bit code pages such as Windows-1252 or ISO-8859-1. They are not part of ASCII and differ between code pages; for 160–255, ISO-8859-1 matches the first 256 Unicode code points.

Ready-made Text to ASCII Codes presets