ASCII Converter

Convert text to ASCII codes (decimal, hex, binary, octal) and decode ASCII values back to readable text. Enter any character or string to see its ASCII representation, or paste ASCII code numbers to decode them instantly.

Frequently Asked Questions

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns a unique numeric value to 128 characters, including letters (A-Z, a-z), digits (0-9), punctuation marks, and control characters. Developed in the early 1960s and standardized in 1968, ASCII was the dominant character encoding for computers and telecommunications for decades. Each character is represented by a 7-bit integer from 0 to 127, though it is typically stored as an 8-bit byte.

How do you convert text to ASCII?

To convert text to ASCII, look up the decimal code for each character in the ASCII table. For example, the letter 'A' has the ASCII code 65, 'B' is 66, and lowercase 'a' is 97. Spaces have ASCII code 32. To express these in hexadecimal, convert each decimal code: 65 in decimal is 41 in hex. In binary, 65 is 01000001. Most programming languages provide built-in functions for this conversion, such as ord() in Python, charCodeAt() in JavaScript, or (int) casting in C.

What is the ASCII code for a space?

The ASCII code for a space character is 32 in decimal (20 in hexadecimal, 00100000 in binary). Space (code 32) is the lowest-numbered printable ASCII character. Codes 0-31 and 127 are control characters used for communication control (like newline, tab, carriage return) rather than printable symbols. Among these, horizontal tab is code 9, line feed (newline) is code 10, and carriage return is code 13.

What is the difference between ASCII and Unicode?

ASCII uses 7 bits to represent 128 characters, covering English letters, digits, and common symbols. Unicode is a much larger standard that encodes over 149,000 characters from virtually all writing systems worldwide, including Chinese, Arabic, emoji, and mathematical notation. ASCII characters occupy exactly the same positions (0-127) in Unicode, so all ASCII text is valid Unicode. Unicode uses UTF-8 as its most common encoding, where ASCII characters are stored in 1 byte while other characters use 2-4 bytes.

What are ASCII control characters?

ASCII control characters are the first 32 codes (0-31) plus code 127 (DEL). They are non-printable characters originally used to control communication devices and terminals. Common examples include: NUL (0) — null terminator used to end strings in C; TAB (9) — horizontal tab; LF (10) — line feed / newline used in Unix systems; CR (13) — carriage return used in old typewriters and Windows line endings (CRLF); ESC (27) — escape character used to start terminal escape sequences; DEL (127) — delete.

What is the difference between uppercase and lowercase in ASCII?

In ASCII, uppercase letters A-Z have codes 65-90, and lowercase letters a-z have codes 97-122. The difference between any uppercase letter and its lowercase counterpart is exactly 32 (for example, A=65 and a=97; B=66 and b=98). In binary, this difference is bit 5 (value 32): uppercase letters have bit 5 set to 0 and lowercase have it set to 1. This elegant design means you can toggle case by flipping a single bit, which makes case conversion extremely efficient in low-level programming.

What is extended ASCII?

Extended ASCII refers to various 8-bit character encodings that use codes 128-255 to add additional characters beyond the original 128 ASCII characters. Unlike the standard ASCII range (0-127), which is universally agreed upon, codes 128-255 vary by encoding. Common extensions include ISO 8859-1 (Latin-1) which adds Western European characters like accented letters (é, ü, ñ), and Windows-1252 which is similar but includes typographic symbols. Extended ASCII is largely superseded by Unicode for modern applications.

How does ASCII relate to UTF-8?

UTF-8 is designed to be backward-compatible with ASCII. For the first 128 code points (0-127), UTF-8 uses exactly the same single byte as ASCII. This means any valid ASCII text is also valid UTF-8 without modification. For characters beyond 127, UTF-8 uses multi-byte sequences of 2 to 4 bytes, with the leading byte indicating the sequence length. This backward compatibility made UTF-8 easy to adopt and is one reason it became the dominant encoding on the internet, representing over 98% of web pages.

How do you convert ASCII codes to text?

To convert ASCII decimal codes back to text, look up each number in the ASCII table and write the corresponding character. For example, the sequence 72, 101, 108, 108, 111 spells 'Hello' (H=72, e=101, l=108, l=108, o=111). For hexadecimal input, convert each hex value to decimal first (or look it up directly). In programming, use chr() in Python, String.fromCharCode() in JavaScript, or cast an integer to char in C/C++ and Java.

What is the ASCII code for a newline?

There are two ASCII control characters related to newlines: Line Feed (LF, code 10) and Carriage Return (CR, code 13). Unix/Linux and macOS use LF alone (\n) to end lines. Windows uses the combination CR+LF (\r\n, codes 13 and 10). Old Mac OS used CR alone. LF originated from the mechanical action of advancing paper one line on a printer, while CR moved the print head back to the start of the line — both were needed on physical terminals.

Do Chinese characters have ASCII codes?

ASCII defines only 128 characters: English letters, digits, symbols, and control characters. Chinese characters such as 汉 are outside the ASCII range. They have Unicode code points and can be stored with encodings such as UTF-8 or UTF-16. If you paste Chinese text into this tool, it shows the character’s Unicode code point (U+XXXX) rather than an ASCII code.

What are non-ASCII characters?

Non-ASCII characters are all characters with code points above 127, including Chinese, Japanese, Arabic, accented European letters such as é, ü, and ñ, emoji, and mathematical symbols. They require a Unicode encoding; UTF-8 represents them with two to four bytes.

Do emojis have ASCII codes?

No. Emoji are Unicode characters and lie outside the ASCII range of 0–127. Their code points cover a wide part of Unicode; the smiling face 😀 sits at U+1F600 (decimal 128512), while other symbols reused as emoji, such as ❤ (U+2764) or ☺ (U+263A), live lower in Unicode. In every case, they belong to Unicode, not ASCII.

What Is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard that maps 128 characters to numeric values (0–127). It covers the English alphabet (upper and lowercase), digits 0–9, punctuation, and 33 non-printable control characters such as tab, newline, and carriage return.

Developed in the early 1960s and standardized in 1968, ASCII was the dominant encoding for computers and telecommunications for decades, and still forms the foundation of modern encodings such as UTF-8.

How to Use

Text to ASCII

  1. Select the Text to ASCII tab
  2. Type or paste any text into the input field
  3. Choose an Output Format: Decimal, Hexadecimal, Binary, or Octal
  4. The converted codes appear instantly with a character-by-character breakdown
  5. Click the Copy button to copy the result

ASCII to Text

  1. Select the ASCII to Text tab
  2. Enter ASCII codes separated by spaces or commas (e.g., 72 101 108 108 111)
  3. Auto mode checks every format that can decode the complete sequence within 0–127
  4. If several formats produce different text, choose one of the displayed interpretations
  5. Use 0x41, 0o101, or 0b01000001 to state the base explicitly
  6. Click Copy to copy the decoded result

How to Convert 65 to ASCII Character A

The decimal ASCII code for uppercase A is 65. Look up decimal value 65 in the complete table, or enter A in the Text to ASCII tab and choose Decimal.

The conversion is A → 65. The same code is 41 in hexadecimal, 01000001 in binary, and 101 in octal.

ASCII is limited to code points 0–127, so this example is a standard 7-bit ASCII character.

How to Convert 41 Hex to ASCII Character A

Hexadecimal 41 equals decimal 4 × 16 + 1 = 65. Decimal 65 is uppercase A in the ASCII table.

In the ASCII to Text tab, select Hexadecimal and enter 41, or enter 0x41 in Auto mode.

The result is 41₁₆ → 65₁₀ → A. A plain 41 is ambiguous: decimal produces ), hexadecimal produces A, and octal produces !. Auto mode shows all three choices instead of guessing.

How to Convert Binary 01000001 to ASCII

Binary 01000001 represents 64 + 1 = 65 in decimal. ASCII decimal 65 is uppercase A.

Enter 01000001 in the ASCII to Text tab. Auto checks the complete input against decimal, hexadecimal, binary, and octal syntax and the ASCII range. Only binary is valid for this value, so it is selected automatically.

The conversion is 01000001₂ → 65₁₀ → A. Seven-bit values such as 1000001 are also recognized as binary.

Output Formats Explained

Decimal — The standard base-10 representation. Each character maps to a number 0–127. This is the format most ASCII tables use and the most readable for humans (e.g., A=65, space=32).

Hexadecimal — Base-16 representation using digits 0-9 and letters A-F. Commonly used in programming, memory dumps, and URL percent-encoding (e.g., A=41, space=20).

Binary — Base-2 representation using only 0 and 1. Each ASCII character occupies 8 bits (one byte) with the leading bit always 0 for standard ASCII (e.g., A=01000001).

Octal — Base-8 representation, historically used in Unix file permissions and early computing. Each standard ASCII character fits in 3 octal digits (e.g., A=101, space=040).

Complete ASCII Table (0–127)

Control Characters (0–31 and 127)

DecimalHexBinaryOctalMnemonicDescription
00000000000000NULControl character
10100000001001SOHControl character
20200000010002STXControl character
30300000011003ETXControl character
40400000100004EOTControl character
50500000101005ENQControl character
60600000110006ACKControl character
70700000111007BELControl character
80800001000010BSControl character
90900001001011HTControl character
100A00001010012LFControl character
110B00001011013VTControl character
120C00001100014FFControl character
130D00001101015CRControl character
140E00001110016SOControl character
150F00001111017SIControl character
161000010000020DLEControl character
171100010001021DC1Control character
181200010010022DC2Control character
191300010011023DC3Control character
201400010100024DC4Control character
211500010101025NAKControl character
221600010110026SYNControl character
231700010111027ETBControl character
241800011000030CANControl character
251900011001031EMControl character
261A00011010032SUBControl character
271B00011011033ESCControl character
281C00011100034FSControl character
291D00011101035GSControl character
301E00011110036RSControl character
311F00011111037USControl character
1277F01111111177DELControl character

Printable Characters (32–126)

DecimalHexBinaryOctalCharacterDescription
322000100000040SpacePrintable character
332100100001041!Printable character
342200100010042"Printable character
352300100011043#Printable character
362400100100044$Printable character
372500100101045%Printable character
382600100110046&Printable character
392700100111047'Printable character
402800101000050(Printable character
412900101001051)Printable character
422A00101010052*Printable character
432B00101011053+Printable character
442C00101100054,Printable character
452D00101101055-Printable character
462E00101110056.Printable character
472F00101111057/Printable character
4830001100000600Printable character
4931001100010611Printable character
5032001100100622Printable character
5133001100110633Printable character
5234001101000644Printable character
5335001101010655Printable character
5436001101100666Printable character
5537001101110677Printable character
5638001110000708Printable character
5739001110010719Printable character
583A00111010072:Printable character
593B00111011073;Printable character
603C00111100074<Printable character
613D00111101075=Printable character
623E00111110076>Printable character
633F00111111077?Printable character
644001000000100@Printable character
654101000001101APrintable character
664201000010102BPrintable character
674301000011103CPrintable character
684401000100104DPrintable character
694501000101105EPrintable character
704601000110106FPrintable character
714701000111107GPrintable character
724801001000110HPrintable character
734901001001111IPrintable character
744A01001010112JPrintable character
754B01001011113KPrintable character
764C01001100114LPrintable character
774D01001101115MPrintable character
784E01001110116NPrintable character
794F01001111117OPrintable character
805001010000120PPrintable character
815101010001121QPrintable character
825201010010122RPrintable character
835301010011123SPrintable character
845401010100124TPrintable character
855501010101125UPrintable character
865601010110126VPrintable character
875701010111127WPrintable character
885801011000130XPrintable character
895901011001131YPrintable character
905A01011010132ZPrintable character
915B01011011133[Printable character
925C01011100134\Printable character
935D01011101135]Printable character
945E01011110136^Printable character
955F01011111137_Printable character
966001100000140`Printable character
976101100001141aPrintable character
986201100010142bPrintable character
996301100011143cPrintable character
1006401100100144dPrintable character
1016501100101145ePrintable character
1026601100110146fPrintable character
1036701100111147gPrintable character
1046801101000150hPrintable character
1056901101001151iPrintable character
1066A01101010152jPrintable character
1076B01101011153kPrintable character
1086C01101100154lPrintable character
1096D01101101155mPrintable character
1106E01101110156nPrintable character
1116F01101111157oPrintable character
1127001110000160pPrintable character
1137101110001161qPrintable character
1147201110010162rPrintable character
1157301110011163sPrintable character
1167401110100164tPrintable character
1177501110101165uPrintable character
1187601110110166vPrintable character
1197701110111167wPrintable character
1207801111000170xPrintable character
1217901111001171yPrintable character
1227A01111010172zPrintable character
1237B01111011173{Printable character
1247C01111100174|Printable character
1257D01111101175}Printable character
1267E01111110176~Printable character

ASCII vs. Unicode

ASCII defines only 128 characters and covers English text. Unicode extends this to over 149,000 characters from virtually every writing system worldwide.

UTF-8, the most common Unicode encoding, is designed to be fully backward-compatible with ASCII: the first 128 UTF-8 code points are identical to ASCII, stored as single bytes. Characters outside the ASCII range use 2–4 bytes in UTF-8.

This means:

  • Any ASCII file is also valid UTF-8 without any conversion
  • ASCII tools work correctly on the ASCII portion of any UTF-8 text
  • Non-ASCII characters (e.g., accented letters, CJK, emoji) require Unicode

Common Use Cases

  • Debugging — Inspect the exact byte values of a string when troubleshooting encoding issues or protocol implementations
  • Network protocols — HTTP, SMTP, and many other protocols communicate via ASCII text; understanding ASCII codes helps when reading raw protocol data
  • Programming — Convert between characters and their numeric codes when working with character arithmetic (e.g., checking if a character is a digit or letter)
  • Data formats — Understand percent-encoding in URLs (e.g., space = %20) and escape sequences in JSON and CSV
  • Education — Learn how computers represent text at the byte level

Tips

  • The difference between any uppercase letter and its lowercase equivalent in ASCII is exactly 32 — flipping bit 5 toggles the case
  • Digits 0–9 have ASCII codes 48–57, so subtracting 48 from the ASCII code gives the numeric value of the digit
  • ASCII control characters NUL (0), LF (10), CR (13), and TAB (9) appear frequently in file formats and network protocols — knowing their codes avoids confusion when reading hex dumps

Related Tools