Text to ASCII Converter

Type text, a single character or a block of code and get the ASCII code of every character in decimal, hex, octal or binary, with a table that names control characters. Switch direction to turn ASCII codes back into text. Runs in your browser.

What you can do here

Each mode has a link: ?mode=text-to-ascii, ?mode=char-to-ascii, ?mode=code-to-ascii, ?mode=ascii-to-text.

How text to ASCII conversion works

ASCII assigns the numbers 0–127 to 128 characters: 33 control codes (0–31 and 127), the space (32), and 94 printable letters, digits and symbols. Converting text to ASCII simply reads the number behind each character: H is 72, e is 101, a space is 32. The same number can be written in any base — 72 is 0x48 in hex, 110 in octal and 01001000 in binary.

Characters outside ASCII, such as é or emoji, have Unicode code points above 127. They are still converted (as their code point) but highlighted in the table so you know the result is not pure ASCII.

ASCII table: printable characters

DecHexCharDecHexCharDecHexChar
3220space483006541A
3321!57399905AZ
3422"583A:9761a
3523#593B;1227Az
3927'603C<1237B{
442C,623E>1257D}
462E.633F?1267E~
472F/6440@1277FDEL

Useful patterns: uppercase A–Z are 65–90 and lowercase a–z are 97–122, exactly 32 apart, so flipping bit 5 changes case. Digits 0–9 are 48–57, so subtracting 48 gives the digit's value.

Control characters you will meet in code

DecHexNameEscape
000NUL (null)\0
909TAB (horizontal tab)\t
100ALF (line feed, Unix newline)\n
130DCR (carriage return; CR LF is the Windows newline)\r
271BESC (starts terminal color codes)\x1b

Common questions

How do I convert text to ASCII?

Type or paste the text. Each character's ASCII code appears immediately, separated by spaces; pick hex, octal or binary in Base, and a different separator if you need commas or one code per line.

How do I find the ASCII code of a single character?

Choose Char to ASCII and type the character. The table shows its decimal, hex, octal and binary code and its HTML entity, for example A = 65 = 0x41 = &#65;.

What does code to ASCII show?

The same codes, but tuned for source code: one code per line option, and whitespace such as tab (9), line feed (10) and carriage return (13) named in the table, which helps track down invisible characters and Windows line endings.

What happens to characters like é or emoji?

They are not ASCII. The tool outputs their Unicode code point (é is 233, 😀 is 128512) and highlights them, so you can spot text that will not survive an ASCII-only system.

Is ASCII the same as UTF-8?

For codes 0–127, yes: UTF-8 stores ASCII characters as the same single bytes. Characters above 127 take 2–4 bytes in UTF-8; see the hex to text tool to inspect those bytes.

Is my text uploaded?

No. The conversion runs in your browser.