What you can do here
- Text to ASCII: every character of a word, sentence or paragraph as its ASCII code
- Char to ASCII: look up one character, with its decimal, hex, octal, binary and HTML entity
- Code to ASCII: source code with tabs (9), line feeds (10) and carriage returns (13) made visible
- ASCII to text: decimal,
0xhex or binary codes back to characters
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
| Dec | Hex | Char | Dec | Hex | Char | Dec | Hex | Char |
|---|---|---|---|---|---|---|---|---|
| 32 | 20 | space | 48 | 30 | 0 | 65 | 41 | A |
| 33 | 21 | ! | 57 | 39 | 9 | 90 | 5A | Z |
| 34 | 22 | " | 58 | 3A | : | 97 | 61 | a |
| 35 | 23 | # | 59 | 3B | ; | 122 | 7A | z |
| 39 | 27 | ' | 60 | 3C | < | 123 | 7B | { |
| 44 | 2C | , | 62 | 3E | > | 125 | 7D | } |
| 46 | 2E | . | 63 | 3F | ? | 126 | 7E | ~ |
| 47 | 2F | / | 64 | 40 | @ | 127 | 7F | DEL |
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
| Dec | Hex | Name | Escape |
|---|---|---|---|
| 0 | 00 | NUL (null) | \0 |
| 9 | 09 | TAB (horizontal tab) | \t |
| 10 | 0A | LF (line feed, Unix newline) | \n |
| 13 | 0D | CR (carriage return; CR LF is the Windows newline) | \r |
| 27 | 1B | ESC (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 = A.
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.