Skip to content

ASCII Converter: Text to ASCII Codes (Dec, Hex, Binary)

ASCII converter that turns text into decimal, hex, binary, or octal character codes and back, live as you type. Unicode and emoji safe. Free.

By Updated Runs in your browser

ASCII Converter guide

Convert text to ASCII codes in decimal, hexadecimal, binary, or octal, or paste codes to get text back. Characters beyond ASCII, including accented letters and emoji, are shown as their Unicode code points.

What ASCII actually is

ASCII, the American Standard Code for Information Interchange, dates to the 1960s. It assigns a number from 0 to 127 to each character a US teletype needed: 26 uppercase letters, 26 lowercase, 10 digits, punctuation, the space, and 33 control codes. Seven bits are enough to store any of them, which is why ASCII values never exceed 127.

The layout is deliberate. Digits 0 to 9 are codes 48 to 57, so subtracting 48 from a digit's code gives its value. Uppercase A to Z are 65 to 90 and lowercase a to z are 97 to 122, exactly 32 apart. Flip one bit (the 32s bit) and you change case, which is how early software implemented uppercase conversion.

Worked example: converting 'Hi!'

H is 72, i is 105, and ! is 33. In hexadecimal those are 48, 69, and 21. In binary, padded to 8 bits: 01001000 01101001 00100001. Paste '72 105 33' into the codes box with Decimal selected and you get Hi! back.

Each format shows the same value in a different base. Decimal is easiest to read. Hex is what you see in hex editors, URL encoding (%21 is !), and HTML entities (!). Binary shows the actual bits, useful when learning how computers store text or doing bitwise puzzles. Octal shows up in old Unix tools and escape sequences like \041.

Control characters worth knowing

The first 32 codes are invisible instructions rather than symbols. The ones you will meet most: 9 is tab, 10 is line feed (LF), 13 is carriage return (CR), and 0 is null. Windows ends lines with CR LF (13 10); macOS and Linux use LF alone (10). That mismatch explains stray ^M characters in files moved between systems and diffs that flag every line as changed.

Code 127 is delete, a leftover from paper tape, where punching all seven holes erased a character. Code 27 is escape, still used today to start terminal color codes such as ESC[31m for red text.

Beyond 127: Unicode and UTF-8

Characters like é, €, and emoji are not ASCII. This converter shows their Unicode code points instead: é is 233 (U+00E9), € is 8364 (U+20AC), and 😀 is 128512 (U+1F600). The first 128 Unicode code points match ASCII exactly, so plain English text gives the same numbers either way.

Code points are not bytes. In UTF-8, the encoding used by about 98% of websites, ASCII characters take one byte each, é takes two bytes, € three, and most emoji four. If you need the raw bytes, for example to debug a URL, the URL encoder shows them as percent-encoded pairs. The status line under the tool tells you how many characters fall outside the 0 to 127 ASCII range, which is a quick way to spot smart quotes or non-breaking spaces pasted from a word processor.

Common mistakes

Confusing the character '7' with the number 7. The digit character has code 55; the control code 7 is the bell. Mixing bases is another: '65' in hex is 101 in decimal, which is lowercase e, not A. Pick the right format in the dropdown before pasting codes.

Watch out for extended ASCII tables online. Values from 128 to 255 depend on the code page. In Windows-1252, 147 and 148 are curly quotes; in ISO-8859-1 they are control codes, and in Unicode they are control codes too. When a document shows ’ where an apostrophe should be, UTF-8 bytes are being read as Windows-1252.

Where developers use this

Debugging invisible characters is the everyday case: a zero-width space (8203) breaking a CSV import, a non-breaking space (160) that fails a string comparison, or a tab that should have been spaces. Paste the suspicious text and read the codes.

It also helps with simple ciphers and CTF puzzles, where messages often arrive as lists of decimal or binary numbers, and with teaching how text becomes data. Everything converts locally in your browser as you type.

How we calculate: sources

Frequently asked questions

What is the ASCII code for A?

Uppercase A is 65 in decimal, 41 in hex, and 01000001 in binary. Lowercase a is 97. Every lowercase letter is exactly 32 more than its uppercase version.

How many characters are in ASCII?

128, numbered 0 to 127. Codes 0 to 31 and 127 are control characters such as tab (9), line feed (10), and carriage return (13). Codes 32 to 126 are printable, starting with the space at 32.

What is the difference between ASCII and Unicode?

ASCII covers 128 characters for English. Unicode covers over 150,000 characters across writing systems, and its first 128 code points are identical to ASCII, so any ASCII text is also valid Unicode and UTF-8.

What about extended ASCII (128 to 255)?

There is no single extended ASCII. Code pages such as Windows-1252 and ISO-8859-1 assign different characters to 128-255. This tool uses Unicode code points, where 233 is é, matching ISO-8859-1 for that range.

Why does an emoji show a big number like 128512?

Emoji live outside ASCII. 😀 is Unicode code point U+1F600, which is 128512 in decimal. The tool reads full code points, so each emoji becomes one number rather than two broken halves.

How do I separate codes when converting back to text?

Use spaces, commas, or new lines. Prefixes such as 0x for hex and 0b for binary are accepted and stripped. Invalid codes are skipped and listed so you can fix them.

Is my text uploaded?

Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.

What is the ASCII code for a space?

32 in decimal, 20 in hex, and 00100000 in binary. It is the first printable character in the table.

What is the ASCII value of 0?

The digit character 0 is 48 (hex 30). The value 0 itself is the NUL control character, used to end strings in C.