← All reference

ASCII Table & Unicode Basics

All 128 ASCII characters with decimal, hex, octal and binary codes, control characters explained — plus how Unicode code points and UTF-8 encoding actually work, and a char inspector for any character you paste in.

ASCII assigns the numbers 0–127 to characters: 33 control codes (0–31 and 127), the space, and 94 printable characters. It fits in 7 bits, which is why it survived — every mainstream text encoding, including UTF-8, keeps these first 128 values byte-for-byte identical. When you know a byte is 0x41 and need to know it's A (or the reverse), this is the table.

Decimal
Code point
UTF-8 bytes
UTF-16 units
Everything is computed locally — nothing you type leaves the page.

The full ASCII table (0–127)

DecHexOctBinaryCharDescription

Control characters (0–31 and 127)

The control codes were designed for teletypes, and a handful still matter daily: LF (10, \n) ends lines on Unix; CR LF (13 10, \r\n) ends lines on Windows and in every HTTP header; HT (9, \t) is the tab; NUL (0, \0) terminates C strings; ESC (27) opens ANSI terminal color sequences; and BEL (7, \a) still beeps some terminals. In a terminal, Ctrl+letter sends the letter's code minus 64 — Ctrl+C is ETX (3), Ctrl+D is EOT (4), Ctrl+Z is SUB (26). DEL (127) is the odd one out at the top: all seven bits set, because on paper tape you "deleted" a character by punching every hole.

The printable range (32–126)

Space is 32, digits 0–9 are 48–57, uppercase A–Z are 65–90, lowercase a–z are 97–122 — and the layout is deliberate. Upper and lower case differ by exactly one bit (32), so historical case-insensitive comparison was a single OR. A digit's numeric value is its code minus 48, which is why '5' - '0' works in C. Sorting by ASCII code puts all uppercase before all lowercase ("Z" < "a") — the classic surprise in naive string sorts.

Unicode: code points beyond 127

Unicode extends the same idea to every writing system: each character gets a code point, written U+0041 (hex), from U+0000 to U+10FFFF — room for 1,114,112 code points. A code point is an abstract number; an encoding decides its bytes. UTF-8 is the dominant encoding because it's ASCII-compatible: code points up to 127 are the same single byte as ASCII, and everything else uses 2–4 bytes.

Code point rangeBytesUTF-8 byte patternExample
U+0000 – U+007F10xxxxxxxA → 41
U+0080 – U+07FF2110xxxxx 10xxxxxxé → C3 A9
U+0800 – U+FFFF31110xxxx 10xxxxxx 10xxxxxx€ → E2 82 AC
U+10000 – U+10FFFF411110xxx 10xxxxxx 10xxxxxx 10xxxxxx🚀 → F0 9F 9A 80

The code point's bits fill the x positions, high bits first. The design is self-synchronizing: a leading byte tells you the sequence length, and continuation bytes always start 10, so you can find a character boundary from any offset. Note that JavaScript strings are UTF-16 under the hood — code points above U+FFFF take two 16-bit units (a surrogate pair), which is why "🚀".length is 2.

The byte order mark (BOM)

The BOM is the code point U+FEFF placed at the start of a file. In UTF-16 it's genuinely needed to signal byte order: FE FF means big-endian, FF FE little-endian. In UTF-8 it encodes as EF BB BF and carries no byte-order information — it only marks the file as UTF-8, and mostly causes trouble: shebang lines that stop working, JSON parsers that reject the file, invisible junk at the start of concatenated output. Convention today: UTF-8 without BOM everywhere, unless a Windows tool specifically demands one.

About this reference

The table covers US-ASCII as standardized (ANSI X3.4 / ISO 646), which is also the first 128 code points of Unicode (the Basic Latin block) and the single-byte range of UTF-8. Codes 128–255 are not ASCII — they belong to whichever extended encoding (Latin-1, Windows-1252, …) or UTF-8 multi-byte sequence the data is in, which is exactly why "extended ASCII" tables disagree with each other.

Related tools on this site: encode and decode data with the Base64 tool and the URL encoder, transform text with the string case converter, or convert values between bases with the number base converter. This whole page runs locally in your browser.