Text to ASCII
Convert text into ASCII / Unicode code points.
Base
Code Points
Text to Character Codes
Every character maps to a numeric code point. For the ASCII range (A–Z, digits, punctuation) these are the classic 0–127 values; beyond that, Unicode code points cover accented letters, symbols, and emoji. This tool outputs each character's code point in decimal or hexadecimal, space-separated. Pairs with the ASCII to Text tool. Runs locally.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Producing code points to paste into a test that has to assert on exact character values.
- Explaining an off-by-32 case bug by showing the numeric distance between the two letters.
- Building an escaped representation of a string for a format that cannot carry the characters directly.
- Identifying an invisible character in data by looking at its value rather than its appearance.
- Preparing numeric values for a puzzle or a teaching exercise about character encoding.
Frequently Asked Questions
- Which output base should I choose?
- Decimal is most readable for teaching, hex is standard in dumps and debugging, binary shows the bit pattern, and octal appears in string escapes. All four describe the same bytes — pick by audience, not by correctness.
- What happens to characters outside ASCII?
- They are not ASCII at all, since ASCII stops at 127. They are encoded as their UTF-8 bytes, so 'é' produces two values (195 169) rather than one. Any tool claiming a single ASCII code above 127 is guessing at a codepage.
- Why is uppercase exactly 32 below lowercase?
- By deliberate design — the difference is a single bit (0x20), so early hardware could change case with one bitwise operation. 'A' is 65 and 'a' is 97 for that reason, not by coincidence.
- What are the control codes I should recognise?
- 9 tab, 10 line feed, 13 carriage return, 27 escape (which begins terminal colour sequences), 0 null and 7 bell. CR and LF being separate is the origin of the Windows/Unix line-ending split.
- Is a separator needed between values?
- For decimal and octal yes, or the digits run together ambiguously. Hex and binary have fixed widths per byte (2 and 8 characters), so they can be written unseparated and still decoded correctly.
- How do I read a value back without a separator?
- Only if the width is fixed. Zero-padded three-digit decimal or two-digit hex is unambiguous; unpadded values are not, because 65 could be one character or two. Fixed width is what makes a separator optional.
- Why does the DEL character sit at 127 rather than 0?
- Because on paper tape, deleting a character meant punching out every hole in its position — all seven bits set, which is 127. It is a physical artefact of the medium, preserved in the standard ever since.
- Is ASCII a subset of Unicode?
- Yes — the first 128 code points are identical, deliberately. That is what makes ASCII text valid UTF-8 unchanged, and why an ASCII-only file needs no conversion at all when a system moves to Unicode.
Common errors and gotchas
- Choosing a base and not recording it, which leaves the reader guessing whether 101 means `e` or `A`.
- Assuming everything fits in ASCII. Characters above 127 are Unicode code points, and calling them ASCII causes the confusion later.
- Omitting separators, after which a sequence of digits cannot be split back reliably at all.
- Overlooking that DEL sits at 127 rather than with the other control codes, which is a teletype artefact rather than a mistake.
- Expecting the numbers to survive a font or locale change. They are the encoding, not the rendering, and rendering is what varies.
Related Encoders & Decoders tools
Base64 Encoder
Encode or decode Base64 strings.
URL Encoder
Safely encode or decode URL parameters.
Base Converter
Convert numbers between binary, octal, decimal, hex, and base 2-36.
ROT13 Encoder / Decoder
Apply the reversible ROT13 letter-substitution cipher.
HTML Entity Encoder / Decoder
Escape or unescape HTML entities like & and <.
Punycode Converter
Convert internationalized domains to and from Punycode.
Text to Morse Code
Translate text into Morse code dots and dashes.
Morse Code to Text
Decode Morse code dots and dashes back into text.