ASCII Table Reference Calculator

Enter an ASCII code or a character to convert.

Result

97
97
0x61
01100001

How it is calculated

The tool works in two directions. In code-to-character mode you enter a whole decimal number from 0 to 127 and it returns the character. In character-to-code mode it reads only the first character you typed and returns its code. Either way the result is shown as decimal, hexadecimal (0x plus two digits) and 8-bit binary padded with zeros.

Hex and binary are the same number written in base 16 and base 2: code = 16·h₁ + h₀ for hex, and the sum of powers of two for binary. Codes 0 to 31 and 127 are control characters with no visible glyph, so they appear as names in square brackets, such as [LF] for 10 or [TAB] for 9. Code 32 is a space. Only the 7-bit ASCII range is accepted: anything above 127, negative numbers, hex or binary text, and non-ASCII characters such as é give no result.

Worked example

Character-to-code mode, typing a lowercase a. Its ASCII code is 97. In hexadecimal, 97 = 6 × 16 + 1, so the tool shows 0x61. In binary, 97 = 64 + 32 + 1, which is 01100001 in eight bits. The capital A is 65, exactly 32 lower, so the two letters differ only in bit 5 (value 32).

Try this example →

Common mistakes

  • Typing a word and expecting a code for each letter. Only the first character is converted, so abc gives the code of a (97).
  • Entering an accented or other non-ASCII character such as é or ş. It is outside the 0 to 127 range, so the tool shows no result rather than a code.
  • Mixing up the digit and the character: the character 5 has code 53, while code 5 is the control character [ENQ].
  • Entering the code in hexadecimal (0x41) or binary (01000001) in code-to-character mode. The field reads a decimal whole number only and rejects these.
  • Looking for a visible symbol for codes below 32. Codes like 10 (line feed) or 13 (carriage return) are shown as names such as [LF] and [CR], not as a printable glyph.

About this calculator

ASCII (American Standard Code for Information Interchange) is the foundational 7-bit character encoding that assigns a number from 0 to 127 to each letter, digit, punctuation mark, and control character used in early computing — the basis that later encodings like Latin-1 and UTF-8 build on and stay backward-compatible with.

Knowing a character's decimal code, hex value, and binary representation is a routine need whenever you're debugging encoding issues, writing low-level string-handling code, working with control characters like newline (10) or tab (9), or teaching how computers represent text. Programmers, computer science students, and anyone troubleshooting a data-encoding problem reach for a bidirectional ASCII table to move quickly between a character and its numeric codes.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    A handy use is debugging line endings: look up 13 and 10 to see [CR] and [LF], then check which of them your file actually contains. Windows text files usually end lines with both, Unix ones with [LF] alone. The tool covers only codes 0 to 127, so accented letters such as é need a UTF-8 table instead. Which extra encoding, say Latin-1 or UTF-8, would you most like to look up here?

Popular calculators

All Calculators