Text to ASCII Code Converter
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
Choose the direction
Pick Text → ASCII codes, or ASCII codes → Text to decode numbers.
- 2
Pick the values
Keep Code points for one number per character, or choose UTF-8 bytes. Set the Separator.
- 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
Related Tools
- Text to HexConvert text to hexadecimal UTF-8 bytes or code points, and hex back to text.
- Text to BinaryConvert text to binary (8-bit UTF-8 bytes) and binary back to text.
- Unicode Character InspectorSee every character's code point, name, category, script and UTF-8/UTF-16 bytes.
- Unicode Code Point ConverterConvert text to U+ code points, hex or decimal, see UTF-8 and UTF-16 per character, and convert back.
- HTML Entity EncoderEscape text to HTML entities (named, decimal or hex) and decode entities back to characters.