Encoding / Decoding

ASCII / Code Point Lookup

Look up character code points in decimal and hexadecimal.

Input characters

What is ASCII Converter?

ASCII (American Standard Code for Information Interchange) is a character encoding standard. This tool converts between characters and their ASCII codes.

Features

  • Character to ASCII code conversion
  • ASCII code to character conversion
  • Support for decimal, hex, octal, and binary
  • ASCII table reference

Takes a pasted string and reports the code point of every character in decimal and hex, or runs in reverse and rebuilds a string from space-separated numbers. It reads code points rather than bytes, so CJK text and emoji report values above 127, making it a fast way to see what a string contains before hunting an encoding bug.

Why the table stops at 127, and what the rows above it mean

ASCII was standardized in 1968 as a 7-bit code, so it addresses exactly 128 positions. Values 0–31 and 127 are control functions, not glyphs: 9 is TAB, 10 LF, 13 CR, 27 ESC, 127 DEL. The tool labels everything below 32 as a control character and singles out 32 as space, which leaves 95 printable positions covering the digit run 48–57 and the capitals 65–90. Nothing above 127 exists in ASCII at all, so when a row shows 128–65535 the value is a Unicode code point being reported in the same table shape, and the description switches again above 0xFFFF for the supplementary planes. That switch is the practical signal: a BMP or supplementary label means the text is no longer 7-bit safe and any downstream reader that assumes ASCII needs a second look.

The 0x20 bit that separates upper and lower case

The table is laid out arithmetically. Capitals sit at 65–90 and lowercase at 97–122, an offset of exactly 32, which is bit 5 or 0x20. One bit flip changes case with no lookup: 65 | 0x20 is 97 and 97 & 0xDF is 65. That trick is only safe on letters, because [ is 91 and ORing it with 0x20 yields { at 123. Digits are contiguous from 48 to 57, so single-digit arithmetic is a subtraction. The low block also explains escape sequences: \t in C, JSON and regex literals is literally byte 9, \n is 10, \r is 13, and the CRLF pair on Windows is the two bytes 13 followed by 10, which is why editors that normalize line endings change byte counts.

One glyph, three different numbers

The same character has several honest numbers and mixing them up is the usual source of mojibake. An emoji such as 😀 has code point 128512 (0x1F600), the single row this tool prints; JavaScript reports its length as 2 because it is stored as the surrogate pair D83D DE00; UTF-8 spends 4 bytes on it, F0 9F 98 80. A Chinese character like 中 is one UTF-16 unit at 20013 (0x4E2D) but 3 UTF-8 bytes, E4 B8 AD. The lookup loop iterates with for-of, which yields whole code points, so a surrogate pair never splits into two rows. Treat the printed value as a code point: \xNN escapes only accept bytes up to 0xFF, so 20013 belongs in a \u4E2D escape, not a hex byte escape.

Worked example

ASCII and CJK characters in a single lookup

Input
A中
Output
A  65  0x41  ASCII printable
中  20013  0x4E2D  BMP

Both rows come from codePointAt, so 中 occupies one row even though it is 3 bytes in UTF-8. The hex column is not zero-padded: a tab would print as 0x9, not 0x09. Feeding 20013 back in code-to-character mode returns 中.

Limits and pitfalls

  • Hex output is not zero-padded, so control characters print as 0x9 or 0x1F and will not line up with fixed-width two-digit tables.
  • Decimal and hex entry are separate: typing 0x41 while the decimal radio is selected parses as 0, because parseInt stops at the x, and the row shows an invisible NUL.
  • Numbers are split on whitespace only, and anything outside 0–1114111 (0x10FFFF) is silently skipped instead of reported, so a typo can simply vanish from the output.
  • The surrogate range 0xD800–0xDFFF passes the range check and produces a lone surrogate that renders as a replacement glyph rather than raising an error.
  • There is no input length cap: one table row is produced per code point, so pasting a whole document renders a row per character and recomputes on every keystroke.

Related tools

Pick this page or a one-liner: six decisions

DecisionThis lookup pageThe alternative
Reading the code point of one characterThe row carries decimal and hex at once, and the decimal can be typed straight back into code-to-character mode to confirm the round trip.The browser console needs no tab: "A".codePointAt(0) gives 65, but there is no hex column and nothing to compare against.
A whole string, one row per characterPaste it and read down the table; the concat line below is built from the same cells, so you can see the string come back — a space reappearing as the literal text (Space) is the tool working as written, not data loss.For a string that lives in a file, a four-line Node script — [...s].map(c => c.codePointAt(0)) — writes the numbers to disk; here the output only exists on screen until you copy it.
Turning numbers back into textCode-to-character mode splits on any whitespace run, so a column lifted out of a log or a spreadsheet decodes without cleanup.If the numbers are raw bytes, go through the Hex tool: E4 B8 AD decodes to 中, whereas the same values pasted here as 228 184 173 become ä ¸ ­, because each row is read as a code point.
Tracking down mojibake in a payloadOnly code points are shown: 中 is 20013 / 0x4E2D, and its 3-byte UTF-8 length is inferred from the range, never observed.Mojibake is a byte question, so open the Hex tool and look at what actually arrived on the wire — if the bytes are E4 B8 AD but the reader assumed Latin-1, the fix is at the reader.
Writing the escape into sourceThe hex column is a code point, so it drops into \u4E2D or \u{4E2D}; it is not a byte escape and will not fit \xNN.The Unicode escape tool converts a whole string at once and knows the dialect you need (JS, JSON, HTML), which beats translating row by row when you have more than a few characters.
Finding a character by name, or scanning the full tableEach row only gets a class label — control character, space, ASCII printable, BMP, supplementary — so a value like 8364 tells you € only after you copy it.man ascii prints the 128 ASCII entries with octal, hex and decimal side by side; for names above 127, unicode.org/charts is the table that has them.

The five classes this table emits, by code point range

Code point rangeClass label shownUTF-8 bytesExample row
0–31Control character18 → 0x8
32Space, and the char cell reads (Space)132 → 0x20
33–126ASCII printable1126 → 0x7E ~
127BMP1127 → 0x7F
128–2047BMP2233 → 0xE9 é
2048–65535BMP38364 → 0x20AC €
65536–1114111Supplementary plane4128512 → 0x1F600 😀

The 127 row shows a labelling gap: the description is decided by code < 32, then code === 32, then code <= 126, so DEL falls through to the BMP branch even though it is a control character. The byte column follows the encoding boundaries at 0x7F, 0x7FF and 0xFFFF, not the class label — BMP spans all three byte widths.

Frequently Asked Questions

Why does the ASCII table only have 128 characters?
ASCII is a 7-bit encoding: 2 to the 7th power gives 128 positions. 0–31 are control characters (CR=13 is carriage return), 32 is space, 65–90 are uppercase A–Z, and 97–122 are lowercase a–z. There is no room for accented letters or Chinese — those require larger systems like Unicode/UTF-8.
Are decimal 65, hex 0x41, and binary 01000001 the same character?
Yes — all three are the letter A in different notations. This tool shows DEC, HEX, OCT, and BIN side by side for every character, so you never have to convert between bases by hand while reading a table.
Why do some characters show values above 127?
Characters outside ASCII (Chinese, é, emoji) are Unicode with code points far beyond 127. The tool displays their Unicode code point and UTF-8 byte sequence instead of failing — a practical way to see that ASCII is a subset of UTF-8.

Content reviewed: