ASCII Table

Every ASCII and Latin-1 code with its decimal, hex, octal, binary and HTML forms.

ASCII Table tool

DecHexOctBinaryCharHTMLDescription

About the ASCII Table

Programmers, students and anyone debugging text files regularly need to look up character codes. This searchable ASCII table lists every code from 0 to 127 in the original ASCII set and the extended range up to 255 from Latin-1, each in decimal, hexadecimal, octal and binary, with the character, its HTML entity and the name of control characters: capital A is 65, lowercase a is 97 and a space is 32. Search by character, code or name.

Control characters from 0 to 31 and 127 have no visible symbol, so the table gives their standard abbreviations and names, such as LF line feed, CR carriage return, HT horizontal tab and ESC escape, which you meet in programming, terminals and file formats. For codes 128 to 159, where Latin-1 has invisible C1 controls, the table also shows the printable characters that Windows-1252 puts there, such as the euro sign and curly quotes, a common source of mojibake.

Type in the search box to find a character by symbol, name or any of its codes, and click a character to copy it. The table works offline once loaded and nothing is uploaded.

To convert whole strings to codes, use text to ASCII or ASCII to text. For Unicode beyond 255, try the Unicode converter, and for HTML escaping, the HTML encoder.

How to use the ASCII Table

  1. Pick the rangeStandard ASCII 0 to 127, extended 128 to 255, or all 256 codes.
  2. SearchType a character, a name like tab or euro, or a code like 65, 0x41 or 101.
  3. Read the codesEach row shows decimal, hex, octal, binary, the character and its HTML entity.
  4. Copy a characterClick the character button to copy it to your clipboard.

ASCII Table features

  • All codes from 0 to 255
  • Decimal, hex, octal and binary
  • HTML numeric and named entities
  • Names for control characters
  • Latin-1 and Windows-1252 characters for 128 to 255
  • Search by symbol, name or code
  • Click to copy a character
  • Works offline

Common uses

  • Looking up character codes while programming
  • Debugging encoding problems and mojibake
  • Writing escape sequences and HTML entities
  • Studying binary and hexadecimal in class
  • Finding control characters in data files

The ASCII table in practice: case and digit tricks, sort order, terminal colours, tabs in Makefiles, special characters and legacy systems

By the FreeToolsWorld editorial team · Updated November 2026 · How we write and check our guides

The ASCII table looks like a dry list of numbers, but its layout explains everyday behaviour in software: why sorting puts capitals first, how programs change letter case, why a Makefile insists on tabs and what the strange codes in coloured terminal output are. This guide works through the patterns built into the table and the places where its codes still matter.

A worked example: case and digits by arithmetic

Upper-case A is 65 and lower-case a is 97, a difference of exactly 32. The same gap holds for every letter, so programs convert case by adding or subtracting 32, which in binary means switching a single bit. Digits follow a similar pattern: the character 0 is 48 and 9 is 57, so a digit character's numeric value is its code minus 48. These two tricks appear in countless programs and exam questions.

Sort order

Sorting text by character codes puts digits before capitals and capitals before lower-case letters, because 48 to 57 come before 65 to 90, which come before 97 to 122. That is why a simple sort places Zebra before apple, and why file names starting with numbers appear first. Case-insensitive sorting compares letters after converting them to the same case.

Printable characters

Codes 32 to 126 are the printable characters: the space, punctuation, digits and letters. Anything outside this range in a field meant for plain text, such as a name or a CSV value, is a control character or a non-ASCII character and may need cleaning. Checking for codes outside the printable range is a quick validation step for data imports.

Escape codes and terminal colours

Code 27 is ESC, the escape character. Terminals interpret ESC followed by a bracket and some numbers as formatting instructions, so ESC[31m switches text to red and ESC[0m resets it. When coloured program output is saved to a file, these sequences appear as strange characters such as ←[31m, which are simply the escape codes made visible.

Tabs in Makefiles

Code 9 is the horizontal tab. The make build tool requires command lines in Makefiles to start with a real tab, and an editor that converts tabs to spaces produces the confusing error missing separator. Configuring the editor to keep tabs in Makefiles avoids it.

A little history

Code 127, DEL, has all seven bits set. On punched paper tape, a mistyped character was erased by punching every hole in that position, turning it into DEL, which machines then ignored. Code 0, NUL, still marks the end of strings in the C language, which is why stray null bytes can cut text short in some programs.

Special characters in password rules

When a site asks for at least one special character, it usually means printable ASCII punctuation, the symbols between the digits and letters in the table, such as ! @ # and %. Some older systems reject spaces or certain symbols; if a strong password is refused, trying a different symbol often works.

Urdu and ASCII-only systems

ASCII contains no Urdu letters at all. Systems built only for ASCII, such as some legacy forms and older devices, either reject Urdu text or garble it. For names in such systems, a consistent English transliteration is the practical fallback, while modern systems should accept Unicode throughout.

Reading the table in other bases

Each row shows the same code in decimal, hex, octal and binary. Programmers usually think in hex, where the letters run from 41 to 5A in upper case and 61 to 7A in lower case. Remembering that 20 is the space and 30 is the digit zero makes hex dumps of text surprisingly readable.

Common mistakes

  • Assuming sorting by code matches dictionary order.
  • Letting editors replace tabs with spaces in Makefiles.
  • Treating escape-code clutter in logs as corruption.
  • Expecting ASCII-only systems to store Urdu names.

Related tools

To change letter case in bulk, use Case Converter. To sort lines with case options, try Text Sorter, and to find hidden characters, Invisible Text Generator.

Characters with structural meaning

Some printable characters carry special meaning in data formats. The double quote, code 34, and the comma, code 44, structure CSV files; the backslash, code 92, starts escape sequences in JSON and many languages. When a value containing them breaks an import, these are the codes to look for and escape.

Monospaced alignment

Tables and diagrams drawn with ASCII characters line up only in monospaced fonts, where every character, including the space, has the same width. Pasted into an ordinary font, the columns drift apart. Code blocks in documentation and chat apps use monospaced fonts for exactly this reason.

The humble space

The space is code 32, and it causes more trouble than its simplicity suggests. HTML collapses several spaces into one, trailing spaces make two values look equal while comparing as different, and some systems trim them silently. Checking for code 32 at the start and end of values is a worthwhile habit when cleaning data.

Privacy

The table runs entirely in your browser and works offline. Nothing you search for is sent anywhere.

Frequently asked questions

What is ASCII?

ASCII, the American Standard Code for Information Interchange, assigns numbers from 0 to 127 to English letters, digits, punctuation and control characters. It dates from 1963 and still forms the first 128 characters of UTF-8 and Unicode.

What is extended ASCII?

Any 8-bit character set that adds codes 128 to 255 to ASCII. There are many; this table uses ISO 8859-1 (Latin-1), which matches the first 256 Unicode code points, and also shows Windows-1252 characters for 128 to 159.

What is the ASCII code for A?

Uppercase A is 65 in decimal, 41 in hexadecimal, 101 in octal and 01000001 in binary. Lowercase a is 97, exactly 32 higher, a pattern that holds for every letter.

What are control characters?

Codes 0 to 31 and 127 are instructions rather than symbols, such as line feed (10), carriage return (13), tab (9) and escape (27). They come from teleprinters and still matter in text files, terminals and network protocols.

Why do I see é instead of é?

Text saved as UTF-8 is being read as Latin-1 or Windows-1252, so the two bytes of é show as two separate characters. The fix is to read the file with the right encoding; the table helps identify the bytes involved.

What is the difference between LF and CR?

LF, line feed (10), moves to the next line; CR, carriage return (13), moves to the start of the line. Unix and macOS end lines with LF, Windows with CR followed by LF.

Does the table need an internet connection?

Only to load the page. After that it works offline, because the whole table is built in your browser and nothing is sent anywhere. You can bookmark it for quick reference.

How do I type a character that is not on my keyboard?

On Windows, hold Alt and type the decimal code on the number pad, for example Alt+0169 for the copyright sign. On a Mac, use the Character Viewer, or simply click a character in this table to copy it.