ASCII Converter

Last updated: February 2026

Last verified: • Updated for 2026/26 tax year

Convert text to ASCII codes (decimal, hexadecimal, binary) and back. Essential tool for programmers, developers, and anyone working with character encoding.

ASCII Code Converter

Text to ASCII & ASCII to Text

Decimal (Base 10)
Hexadecimal (Base 16)
Binary (Base 2)
Quick Tip Type any text and click Convert to see its ASCII representation in decimal, hexadecimal, and binary. Use the mode tabs to convert codes back to text.

Complete ASCII Table

The standard ASCII table contains 128 characters (0-127). Characters 0-31 and 127 are control characters (non-printable), while 32-126 are printable characters.

Printable ASCII Characters (32-126)

CharDecHexBin CharDecHexBin CharDecHexBin
Space322000100000 @644001000000 `966001100000
!332100100001 A654101000001 a976101100001
"342200100010 B664201000010 b986201100010
#352300100011 C674301000011 c996301100011
$362400100100 D684401000100 d1006401100100
%372500100101 E694501000101 e1016501100101
&382600100110 F704601000110 f1026601100110
'392700100111 G714701000111 g1036701100111
(402800101000 H724801001000 h1046801101000
)412900101001 I734901001001 i1056901101001
*422A00101010 J744A01001010 j1066A01101010
+432B00101011 K754B01001011 k1076B01101011
,442C00101100 L764C01001100 l1086C01101100
-452D00101101 M774D01001101 m1096D01101101
.462E00101110 N784E01001110 n1106E01101110
/472F00101111 O794F01001111 o1116F01101111
0483000110000 P805001010000 p1127001110000
1493100110001 Q815101010001 q1137101110001
2503200110010 R825201010010 r1147201110010
3513300110011 S835301010011 s1157301110011
4523400110100 T845401010100 t1167401110100
5533500110101 U855501010101 u1177501110101
6543600110110 V865601010110 v1187601110110
7553700110111 W875701010111 w1197701110111
8563800111000 X885801011000 x1207801111000
9573900111001 Y895901011001 y1217901111001
:583A00111010 Z905A01011010 z1227A01111010
;593B00111011 [915B01011011 {1237B01111011
<603C00111100 \925C01011100 |1247C01111100
=613D00111101 ]935D01011101 }1257D01111101
623E00111110 ^945E01011110 ~1267E01111110
?633F00111111 _955F01011111 DEL1277F01111111

Understanding ASCII

ASCII (American Standard Code for Information Interchange) is a character encoding standard developed in the 1960s that represents text in computers and communication equipment. It uses 7 bits to encode 128 different characters.

ASCII Character Categories

  • Control Characters (0-31, 127): Non-printable characters used for text formatting and device control
  • Digits (48-57): Numbers 0 through 9
  • Uppercase Letters (65-90): A through Z
  • Lowercase Letters (97-122): a through z
  • Punctuation & Symbols (32-47, 58-64, 91-96, 123-126): Space, punctuation marks, and special characters

Important Control Characters

Code Name Abbreviation Description
0 Null NUL Used as string terminator in C/C++
9 Horizontal Tab TAB / \t Tab character for indentation
10 Line Feed LF / \n New line (Unix/Linux/macOS)
13 Carriage Return CR / \r Return to line start (Windows uses CR+LF)
27 Escape ESC Used for escape sequences
32 Space SP Space character (first printable)
127 Delete DEL Delete character
Programming Tip To convert between uppercase and lowercase in ASCII, add or subtract 32. For example: 'A' (65) + 32 = 'a' (97). This works because uppercase and lowercase letters are exactly 32 positions apart.

ASCII in Programming

Working with ASCII codes is fundamental in programming. Here's how to get ASCII values in popular languages:

Python # Get ASCII code ord('A') # Returns 65 # Get character from code chr(65) # Returns 'A'
JavaScript // Get ASCII code 'A'.charCodeAt(0) // 65 // Get character String.fromCharCode(65) // 'A'
C / C++ // Get ASCII code int code = (int)'A'; // 65 // Get character char c = (char)65; // 'A'
Java // Get ASCII code int code = (int)'A'; // 65 // Get character char c = (char)65; // 'A'

Common Use Cases

Input Validation

Check if input contains only letters (65-90, 97-122), digits (48-57), or specific allowed characters using ASCII code ranges.

Encryption

Simple cipher algorithms like Caesar cipher work by shifting ASCII codes. ROT13 shifts each letter by 13 positions.

Sorting

String sorting often uses ASCII values. Note that uppercase letters (65-90) come before lowercase (97-122) in ASCII order.

Case Conversion

Convert case by adding/subtracting 32. Check if uppercase (65-90) then add 32 for lowercase, or vice versa.

Data Encoding

Base64 encoding, URL encoding, and other data formats rely on ASCII character representations.

Network Protocols

HTTP, SMTP, FTP and other text-based protocols use ASCII for headers and commands. HTTP uses CR+LF (13, 10) for line endings.

ASCII vs Unicode

While ASCII was revolutionary, it only supports 128 characters - sufficient for English but not for other languages. Unicode was developed to address this limitation.

Feature ASCII Unicode
Bits Used 7 bits (often stored as 8) Variable (8-32 bits via UTF-8, UTF-16, UTF-32)
Characters 128 Over 143,000 (and growing)
Languages English only All languages, including historical scripts
Symbols Basic punctuation Mathematical, musical, emoji, and more
Compatibility - First 128 Unicode characters = ASCII
UTF-8 Encoding UTF-8 is the most common Unicode encoding on the web. It's backwards-compatible with ASCII - the first 128 UTF-8 characters are identical to ASCII, using just 1 byte. Non-ASCII characters use 2-4 bytes.

Extended ASCII

Extended ASCII uses the full 8 bits, adding 128 more characters (128-255) for accented letters, line-drawing characters, and additional symbols. However, different systems use different extended ASCII tables:

  • ISO-8859-1 (Latin-1): Western European languages
  • Windows-1252: Microsoft Windows Western European
  • ISO-8859-15 (Latin-9): Adds Euro sign (€) to Latin-1
Extended ASCII Warning Extended ASCII (codes 128-255) is not standardised. The same code may display different characters on different systems. For international text, always use UTF-8 Unicode encoding.

Frequently Asked Questions

ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents text in computers and communication equipment. 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 forms the basis of most modern character encoding systems.
The uppercase letter 'A' has ASCII code 65 in decimal, 41 in hexadecimal, and 01000001 in binary. Lowercase 'a' has ASCII code 97 in decimal, 61 in hex, and 01100001 in binary. The difference between uppercase and lowercase versions of any letter is always 32 in decimal.
ASCII uses 7 bits to represent only 128 characters and supports only English characters. Unicode is a comprehensive standard that can represent over 143,000 characters from virtually all writing systems, including emoji, using variable-length encoding like UTF-8. The first 128 Unicode characters are identical to ASCII, making Unicode backwards-compatible.
To convert text to binary, find each character's ASCII decimal code, then convert each decimal number to its 8-bit binary equivalent. For example, 'Hi' converts as: H=72=01001000, i=105=01101001. So 'Hi' in binary is '01001000 01101001'. Our converter above does this automatically.
ASCII control characters (codes 0-31 and 127) are non-printable characters used to control text formatting and device communication. Common examples include: NUL (0) - null character, LF (10) - line feed/newline, CR (13) - carriage return, TAB (9) - horizontal tab, and ESC (27) - escape. These characters were originally designed for controlling teleprinters.
ASCII codes are fundamental in programming for string manipulation, character comparison, input validation, and data encoding. Understanding ASCII helps with tasks like checking if a character is uppercase (codes 65-90), lowercase (97-122), or a digit (48-57). It's also used in encryption algorithms, sorting, and network protocols.
Extended ASCII uses 8 bits to represent 256 characters (codes 0-255), adding 128 additional characters beyond standard ASCII. These include accented letters, line-drawing characters, and special symbols. However, different extended ASCII tables exist (like ISO-8859-1 and Windows-1252), so the same code may show different characters on different systems. For international compatibility, use UTF-8 instead.
Use our converter above by typing or pasting the character and clicking 'Convert'. In programming, use functions like ord() in Python, charCodeAt() in JavaScript, or (int)char in C/C++ to get a character's ASCII value. You can also refer to the ASCII table in this page for quick lookups.
UC

Reviewed by: UK Calculator, Founder & Developer

Founder & Developer - UKCalculator.com

The UK Calculator team is the founder and developer of UKCalculator.com, providing free, accurate calculators for UK residents.

Last updated: February 2026 | ASCII standard per ANSI X3.4-1986

Pro Tips for Accurate Results
  • Double-check your input values before calculating
  • Use the correct unit format (metric or imperial)
  • For complex calculations, break them into smaller steps
  • Bookmark this page for quick future access
Understanding Your Results

Our Ascii Converter provides:

  • Instant calculations - Results appear immediately
  • Accurate formulas - Based on official UK standards
  • Clear explanations - Understand how results are derived
  • 2025/26 updated - Using current rates and regulations
Common Questions

Is this calculator free?

Yes, all our calculators are 100% free to use with no registration required.

Are the results accurate?

Our calculators use verified formulas and are regularly updated for accuracy.

Can I use this on mobile?

Yes, all calculators are fully responsive and work on any device.

People Also Ask

Yes, our calculators use verified formulas and are regularly updated with current UK rates and regulations. Results are provided for guidance - always consult professionals for major financial decisions.

Absolutely! All our calculators are fully responsive and work perfectly on smartphones, tablets, and desktops. No app download needed.

We update all calculators with new rates as soon as they're announced - typically at the start of each tax year (April) or when significant changes occur.

HMRC Compliant
Secure & Private
190+ Calculators
Always Free

Embed This Calculator on Your Website

Free to use. Copy the code below and paste it into your website HTML.