ToolNestr

ASCII Code Converter

Type any character to see its ASCII code in decimal, hex, binary and octal, or enter a code to find the character.

Reviewed by the ToolNestr Editorial Team — July 2026

How ASCII code conversion works

ASCII (American Standard Code for Information Interchange) assigns a unique 7-bit numeric code (0–127) to each character. The converter maps characters to their ASCII decimal values using JavaScript's charCodeAt() method, then converts that decimal value to other common representations — hexadecimal (base-16), binary (base-2), and octal (base-8).

For the reverse direction (code to character), the converter accepts a decimal number between 0 and 255 and returns the corresponding character using String.fromCharCode(). The tool also identifies the character's category — control character (0–31, 127), printable (32–126), or extended ASCII (128–255) — and shows its HTML entity and control character name where applicable.

Worked example

Char "A": 65 (decimal), 0x41 (hex), 01000001 (binary)
Char "Z": 90, 0x5A, 01011010
Char "a": 97, 0x61, 01100001
Char "0": 48, 0x30, 00110000
Space: 32, 0x20, 00100000

ASCII character categories

Distribution of characters across the full ASCII table.

Control (0–31)12% of ASCII
Printable (32–126)37%
Extended (127–255)51%
👩‍💻

Priya Nair

Developer who needs to check ASCII codes when implementing custom serial protocols and debugging character encoding issues in network applications.

🎓

Liam O'Brien

CS student learning about character encoding, binary representation, and how computers store text at the fundamental level.

🔧

Yuki Tanaka

Embedded engineer who works with microcontrollers that use ASCII for serial communication and needs to convert between characters and hex codes.

🛡️

Alex Rivera

Cybersecurity analyst who inspects raw packet data and needs to identify control characters and their hex values in network traffic dumps.

DecHexCharDecHexCharDecHexChar
3220Space6440@9660`
3321!6541A9761a
3422"6642B9862b
3523#6743C9963c
3624$6844D10064d
3725%6945E10165e
3826&7046F10266f
3927'7147G10367g
4028(7248H10468h
4129)7349I10569i
422A*744AJ1066Aj
432B+754BK1076Bk
442C,764CL1086Cl
452D-774DM1096Dm
462E.784EN1106En
472F/794FO1116Fo
483008050P11270p
493118151Q11371q
503228252R11472r
513338353S11573s
523448454T11674t
533558555U11775u
543668656V11876v
553778757W11977w
563888858X12078x
573998959Y12179y
583A:905AZ1227Az
593B;915B[1237B
603C<925C\1247C|
613D=935D]1257D
623E>945E^1267E~
633F?955F_1277FDEL

How to use ASCII Code Converter

1

Enter input

Type a character or string to convert to codes, or enter a decimal ASCII code (0–255) to find the character.

2

Choose direction

Click Char → Code to see decimal, hex, binary, and octal values. Click Code → Char to find the character from a numeric code.

3

Read the results

View all representations side by side, plus the HTML entity and character category (control, printable, or extended).

Tips for ASCII codes

Remember the key offsets

A = 65, a = 97 (difference of 32). 0 = 48. Space = 32. These anchor points make it easy to compute other codes mentally: B = 66, b = 98, 1 = 49, etc.

Use hex codes in programming

Many programming languages use hex notation for characters (\\x41 for A). The hexadecimal view is especially useful when working with network protocols, binary files, or embedded systems.

Know your control characters

Common control characters include NUL (0), TAB (9), LF (10), CR (13), and ESC (27). These appear frequently in text processing and serial communication. The converter identifies them by category.

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard developed in the 1960s. It uses 7 bits to represent 128 characters including uppercase and lowercase letters, digits 0–9, punctuation marks, and control characters. ASCII became the foundation for digital text communication and is still the basis for modern character encodings like UTF-8.

ASCII vs Unicode

While ASCII covers only 128 characters (enough for English), Unicode can represent over a million characters from every writing system in the world. The first 128 Unicode code points are identical to ASCII, ensuring backward compatibility. Unicode uses variable-length encoding (UTF-8, UTF-16, UTF-32) where ASCII-compatible characters use just one byte, making UTF-8 the dominant encoding on the web.

Character categories

ASCII divides into three main groups. Control characters (0–31) are non-printable codes that originally controlled teletype machines — they include common ones like LF (line feed) and TAB still used today. Printable characters (32–126) include space, digits, punctuation, and letters. The DEL character (127) is a special control character used as a delete command.

Control characters explained

Control characters were essential for managing early teletype and terminal communication. NUL (0) is a null filler. SOH (1) Start of Heading, STX (2) Start of Text, ETX (3) End of Text. BEL (7) rang a bell. BS (8) backspace. HT (9) horizontal tab. LF (10) line feed. CR (13) carriage return. ESC (27) escape. Many of these persist in modern protocols and file formats.

Frequently asked questions

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric codes to letters, digits, punctuation, and control characters. It uses 7 bits to represent 128 characters (0–127).

What is the difference between ASCII and Unicode?

ASCII is a 7-bit encoding covering 128 characters. Unicode is a much larger standard that can represent over a million characters from all writing systems. The first 128 Unicode code points are identical to ASCII for backward compatibility.

What are the ASCII character categories?

ASCII divides into three groups: control characters (0–31) for non-printable functions, printable characters (32–126) including letters, digits, and punctuation, and DEL (127) which is a special control character.

What are control characters used for?

Control characters (0–31) were designed for teletype and terminal control. Examples include NUL (null), LF (line feed), CR (carriage return), TAB (horizontal tab), and ESC (escape). Many are still used in text protocols today.

How do I convert a character to ASCII code?

Type a single character in the input field and click Convert. The tool shows its ASCII code in decimal, hexadecimal, binary, and octal formats, plus its HTML entity and category.

Can I convert multiple characters at once?

Yes. Enter a string of characters and the tool will show the code for each character. For bulk conversion, each character displays its own set of codes.

What is the ASCII code for space?

The space character has ASCII decimal code 32, hexadecimal 20, binary 00100000, and octal 40. It is classified as a printable character.

What is extended ASCII?

Extended ASCII refers to 8-bit encodings (128–255) that vary by character set. Code page 437 (IBM PC) and ISO 8859-1 (Latin-1) are common extended ASCII variants with different characters in positions 128–255.

Why does my converted character show 63?

63 is the ASCII code for a question mark (?). Some characters cannot be represented in ASCII and are converted to a question mark by the browser. Use the character-to-code mode to check if your character has a valid ASCII code.

Is ASCII case-sensitive?

Yes. Uppercase A (65) and lowercase a (97) have different ASCII codes. They differ by exactly 32 in decimal, which is a single bit flip in binary.

All tool categories

Converters (69 tools)
📊 CSV ↔ JSON Converter📄 JSON ↔ YAML Converter🔀 JSON ↔ XML Converter💿 Text ↔ Binary Converter🔢 Text ↔ Hex Converter🔗 URL Encoder / Decoder🏷️ HTML Entity Converter📡 Morse Code Converter💻 ASCII Code Converter🔤 Regex Escaper / Unescaper📄 GSM to mm Calculator💾 Data Storage Converter📡 Data Transfer Rate Converter⛽ Fuel Economy Converter📏 Feet & Inches Calculator📐 Inches to Fraction Calculator⚖️ Kg to Lbs Converter⚖️ Lbs to Kg Converter⚖️ Kg to Stone Converter⚖️ Stone to Kg Converter⚖️ Grams to Ounces Converter⚖️ Ounces to Grams Converter⚖️ Grams to Pounds Converter⚖️ Pounds to Grams Converter⚖️ Mg to Grams Converter⚖️ Metric Tons to Kg Converter📏 Cm to Inches Converter📏 Inches to Cm Converter📏 Cm to Feet Converter📏 Feet to Cm Converter📏 Mm to Inches Converter📏 Inches to Mm Converter📏 Meters to Feet Converter📏 Feet to Meters Converter📏 Km to Miles Converter📏 Miles to Km Converter📏 Yards to Meters Converter📏 Feet to Inches Converter📏 Inches to Feet Converter📏 Nautical Miles to Km Converter🌡️ Celsius to Fahrenheit Converter🌡️ Fahrenheit to Celsius Converter🌡️ Celsius to Kelvin Converter🌡️ Kelvin to Celsius Converter🧪 Liters to Gallons (US) Converter🧪 Gallons (US) to Liters Converter🧪 Ml to Fluid Ounces (US) Converter🧪 Fluid Ounces to Ml Converter🧪 Cups (US) to Ml Converter🧪 Quarts to Liters Converter🏎️ Mph to Km/h Converter🏎️ Km/h to Mph Converter🏎️ Knots to Mph Converter🔧 Psi to Bar Converter🔧 Bar to Psi Converter📏 Length Converter⚖️ Weight Converter📐 Area Converter🧪 Volume Converter🏎️ Speed Converter🔧 Pressure Converter⚡ Energy Converter🔌 Power Converter📐 Angle Converter🔢 Number to Words Converter🔢 Words to Numbers Converter➗ Decimal to Fraction Converter➗ Fraction to Decimal Converter🔬 Scientific Notation Converter
🌐 Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧪 Chemistry (50 tools)
🧬 Biology (50 tools)
🏠 Construction & Home Improvement (105 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)