Home › Developer Tools › ASCII Table

ASCII Table

Look up any ASCII code from 0 to 127, plus the extended 128–255 range in Windows-1252 or ISO-8859-1, in decimal, hex, octal, binary and HTML. Search, click to copy, and convert text to codes, all in your browser.

Last updated:

DecHexOctBinaryCharHTMLDescription

Click a character to see all its codes, or click any value in the table to copy it.

Text to ASCII codes

Advertisement

How to use the ASCII Table

  1. Browse the standard 0–127 table, or switch to Extended 128–255 or All 0–255.
  2. Search by typing a character (A), a code (65, 0x41, 01000001), an entity (&) or a name such as tab or euro.
  3. Click a character to see every representation in the detail card, then click a value to copy it.
  4. Pick the extended set: Windows-1252 (what most Western Windows text uses) or ISO-8859-1 with C1 control codes.
  5. Convert text to ASCII codes in the panel below the table, or copy or download the table as CSV.

How ASCII codes are organized

ASCII is a 7-bit code, so every character fits in the values 0 to 127 (binary 0000000 to 1111111). The layout is not random: it is arranged in blocks of 32, which is why so many tricks work with a single bit.

Range (dec)HexContents
0–3100–1FControl characters (NUL, TAB, LF, CR, ESC…)
32–4720–2FSpace and punctuation: ! " # $ % & ' ( ) * + , - . /
48–5730–39Digits 0–9 (the digit's value is code − 48)
58–643A–40: ; < = > ? @
65–9041–5AUppercase letters A–Z
91–965B–60[ \ ] ^ _ `
97–12261–7ALowercase letters a–z
123–1267B–7E{ | } ~
1277FDEL (delete) control character

Useful consequences: the case of a letter is bit 5 (value 32), so 'a' − 'A' = 32 and XOR with 0x20 toggles case. Holding Ctrl on a terminal clears bits 5 and 6, so Ctrl+M sends 13 (carriage return), Ctrl+I sends 9 (tab) and Ctrl+[ sends 27 (escape). That is where the caret notation in the table (^M, ^I, ^[) comes from.

Control characters you still meet today

  • LF (10, \n) ends lines on Linux and macOS; CR LF (13 10, \r\n) ends lines on Windows and in HTTP and email headers. Mixing them causes the classic "^M" at line ends; the line ending converter fixes that.
  • HT (9, \t) is the tab used in TSV files and Makefiles.
  • ESC (27, \x1b) starts ANSI escape sequences such as \x1b[31m for red terminal text.
  • NUL (0, \0) terminates strings in C and is often a sign of binary or UTF-16 data when it shows up in text.
  • BEL (7) beeps a terminal, BS (8) moves back one character, and DEL (127) was originally used to punch out mistakes on paper tape (all seven holes).

Windows-1252 vs ISO-8859-1

Both code pages agree with ASCII for 0–127 and with each other for 160–255, where you find é (233), ü (252), ñ (241), © (169) and the no-break space (160). They differ only in 128–159: ISO-8859-1 reserves it for rarely used C1 control codes, while Windows-1252 places 27 printable characters there, including € (128), … (133), ‘ ’ “ ” (145–148), • (149), – (150), — (151) and ™ (153); five codes (129, 141, 143, 144, 157) are unused. Because so much text labeled as Latin-1 was really written on Windows, the HTML standard tells browsers to decode ISO-8859-1 as Windows-1252. If you see “’” instead of an apostrophe, UTF-8 text was decoded as Windows-1252; the text encoding converter can repair such files.

Frequently asked questions

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding from 1963 that assigns the numbers 0 to 127 to 33 control characters and 95 printable characters: the space, digits, upper and lower case English letters and common punctuation. The first 128 code points of Unicode and UTF-8 are identical to ASCII.

What is the ASCII code for A, a, 0 and space?

Uppercase A is 65 (hex 41), lowercase a is 97 (hex 61), the digit 0 is 48 (hex 30) and the space is 32 (hex 20). Upper and lower case letters differ by exactly 32, which is a single bit (0x20).

What is extended ASCII?

There is no single extended ASCII. Codes 128 to 255 depend on the code page. ISO-8859-1 (Latin-1) puts C1 control codes at 128–159 and accented letters and symbols at 160–255. Windows-1252 uses the same 160–255 but puts printable characters such as €, curly quotes, the en dash and ™ at 128–159. This table lets you switch between both.

What are ASCII control characters?

Codes 0 to 31 and 127 are non-printing control characters that were designed to control teleprinters and data links. A few are still used every day: 9 (tab), 10 (line feed, new line on Linux and macOS), 13 (carriage return, CR LF on Windows), 27 (escape, used in terminal color codes) and 0 (null, the string terminator in C).

How do I write an ASCII character in HTML?

Use a numeric character reference: &#65; or &#x41; for A. A few characters have named entities that you must use in text: &amp; for &, &lt; for < and &gt; for >, and &quot; inside attribute values. For Windows-1252 characters such as €, use the Unicode code point (&#8364;), not the code page number 128.

What is the difference between ASCII and UTF-8?

UTF-8 is a Unicode encoding that stores the 128 ASCII characters as the same single bytes, so plain ASCII text is already valid UTF-8. Characters above 127 take 2 to 4 bytes in UTF-8, unlike single-byte code pages such as Windows-1252.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Binary TranslatorConvert text to binary, hex, octal and back.HTML Entity Encoder / DecoderEscape and unescape HTML entities, named or numeric.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.URL Encoder DecoderPercent-encode or decode URLs, query strings and form data.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Binary to HexConvert binary to hex instantly with steps and signed mode.Checksum CalculatorCompute 8-bit sum, two's complement LRC, XOR/BCC, NMEA, Fletcher and Internet checksums of bytes.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Password GeneratorCreate strong passwords and passphrases.Hash GeneratorGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes of text or files.MD5 Hash GeneratorGenerate MD5 hashes of text, lines or files and verify checksums.SHA-256 Hash GeneratorSHA-256 and HMAC-SHA256 hashes of text, lines or files, in hex or Base64.Base64 Encoder DecoderEncode or decode Base64 text and files, and make data URIs.Bcrypt Hash Generator & CheckerCreate bcrypt password hashes and check a password against a hash.HMAC GeneratorGenerate and verify HMAC signatures with SHA-256, SHA-512, SHA-1 or MD5.CRC32 Checksum CalculatorCalculate CRC-32, CRC-32C, CRC-16 and Adler-32 checksums of text or large files.JWT DecoderDecode JSON Web Tokens, read the claims and expiry, and verify HS256 signatures.JWT GeneratorCreate and sign HS256, HS384 or HS512 JSON Web Tokens in your browser and verify them.Password Strength CheckerSee how strong a password really is, how long it takes to crack and how to improve it.Caesar CipherEncode and decode Caesar shift ciphers and crack unknown shifts with a ranked brute force.Vigenère CipherEncrypt and decrypt Vigenère and Autokey ciphers, and crack unknown keys with frequency analysis.Atbash CipherEncode and decode Atbash ciphers (A↔Z, B↔Y) in Latin or Hebrew, with a live letter mapping table.Unicode Character LookupFind Unicode characters by name or code point and copy them with UTF-8, HTML and code escapes.Punycode ConverterConvert international domain names, emails and URLs between Unicode and xn-- Punycode, in bulk.JSON Escape / UnescapeEscape text for a JSON string, unescape \n and \" back to text, or stringify a whole object.Binary CalculatorAdd, subtract, multiply, divide, AND, OR, XOR and shift binary numbers with decimal values.Hex CalculatorHexadecimal + − × ÷ and AND, OR, XOR, NOT, shifts with decimal and binary equivalents.Base32 Encoder / DecoderEncode and decode Base32 (RFC 4648), Base32hex, Crockford and z-base-32 from text, hex or files.Base58 Encoder / DecoderEncode and decode Base58 and Base58Check (Bitcoin alphabet) from text or hex, with checksum verification.Unicode Escape / UnescapeConvert text to \uXXXX, \u{...}, \x, &#...; or CSS escapes and decode them back.File Hash CheckerGet MD5, SHA-1, SHA-256 and SHA-512 checksums of files and verify them against a hash.TOTP GeneratorGenerate 2FA one-time codes from a secret key, create otpauth QR codes and verify codes.RSA Key GeneratorGenerate 2048, 3072 or 4096-bit RSA key pairs as PEM, PKCS#1, JWK or OpenSSH, locally.SSL Certificate DecoderDecode PEM SSL/X.509 certificates: subject, issuer, expiry, SANs, key and fingerprints.Text Encryption ToolEncrypt and decrypt text with a password using AES-256-GCM, entirely in your browser.Argon2 Hash GeneratorHash passwords with Argon2id, Argon2i or Argon2d and verify them against an encoded hash.Base64 to PDFDecode a Base64 string to a PDF with preview and download, or encode a PDF to Base64.Bitwise CalculatorCalculate AND, OR, XOR, NOT and bit shifts at 8–64 bits with a bit grid and all bases.Playfair CipherEncrypt and decrypt Playfair ciphers from a keyword, with the 5x5 key square and every digraph step.Pwned Password CheckerCheck if a password appeared in data breaches; only 5 characters of its SHA-1 hash are sent.RSA Encryption ToolEncrypt text with an RSA public key and decrypt it with the private key using RSA-OAEP in your browser.SAML DecoderDecode SAMLRequest and SAMLResponse messages to readable XML, attributes and validity times.SSL Certificate ConverterConvert SSL certificates and keys between PEM, DER, PFX/P12 and P7B in your browser.PBKDF2 Hash GeneratorDerive PBKDF2 keys from a password, salt and iteration count with SHA-1, SHA-256 or SHA-512.Protobuf DecoderDecode raw Protocol Buffers hex or Base64 without a schema, or add a .proto for field names.XML Escape / UnescapeEscape & < > " ' for XML text and attributes, unescape entities back, or wrap text in CDATA.Binary Search Tree VisualizerInsert, delete and find in BST, AVL and red-black trees with animated rotations and traversals.CSR GeneratorCreate a certificate signing request (CSR) and private key with SANs, RSA or ECDSA, in your browser.MongoDB ObjectId to TimestampDecode a MongoDB ObjectId to its creation date, or build ObjectIds from dates for range queries.PGP Encrypt / DecryptEncrypt, decrypt, sign and verify PGP messages with your armored keys, entirely offline.PGP Key GeneratorGenerate an OpenPGP key pair (Curve25519, NIST ECC or RSA) with passphrase and expiry, offline.Quoted-Printable Encoder / DecoderEncode or decode quoted-printable email text (MIME) with UTF-8 and 76-character soft line breaks.Self-Signed Certificate GeneratorCreate a self-signed SSL certificate and key for localhost or dev servers, as PEM or PFX.SHA-1 Hash GeneratorSHA-1 and HMAC-SHA1 of text or files in hex or Base64, plus Git blob hashes and verify.SHA-512 Hash GeneratorSHA-512 and SHA-384 hashes of text or files in hex or Base64, HMAC and hash verification.SRI Hash GeneratorCreate Subresource Integrity hashes (sha256/384/512) and ready <script> or <link> tags.SSH Key GeneratorGenerate Ed25519 or RSA SSH key pairs in your browser: OpenSSH public key plus private key.String Escape / UnescapeEscape or unescape strings for JavaScript, Java, C#, Python, C, SQL, regex, CSV and shell.UTF-8 Encoder / DecoderConvert text to UTF-8 bytes in hex, decimal, binary, \x or % and decode bytes back to text.UUID Decoder & ValidatorDecode any UUID: version, variant, v1/v6/v7 timestamp and MAC node, plus bulk validation.Base64 to FileDecode Base64 or a data URI to a downloadable file; detects the real file type and previews it.File Encryption ToolEncrypt and decrypt any file with a password using AES-256-GCM, entirely in your browser.Passphrase GeneratorMake strong, memorable diceware passphrases from a 7,776-word list, with entropy in bits.CSR DecoderDecode a PEM certificate signing request: subject, SANs, key size, signature and CA readiness checks.Enigma Machine SimulatorEncrypt and decrypt with a virtual Enigma I, M3 or M4: rotors, rings, plugboard and lampboard.Hex Opacity CalculatorConvert opacity percent to a 2-digit HEX alpha code and full #RRGGBBAA color, with a 0-100% table.
See all 65 Encoders, Hashes & Crypto →