Converter Tools
Text to ASCII Code Converter
Convert text to ASCII character codes and back. Get decimal, hexadecimal, octal, and binary codes per character, with a UTF-8 byte view and reverse decoding.
Text to ASCII code converter
Number base
Decode reads this base too, unless Auto is selected below.
Code meaning
Identical for plain ASCII. They differ only for characters above code 127, where one character becomes several UTF-8 bytes.
Output
Decimal codes
13 codes
72 101 108 108 111 44 32 87 111 114 108 100 33
Per-character breakdown
Every character with its decimal, hexadecimal, octal, and binary code point, plus the UTF-8 bytes it occupies.
| Char | Dec | Hex | Oct | Binary | UTF-8 bytes |
|---|---|---|---|---|---|
| H | 72 | 48 | 110 | 01001000 | 48 |
| e | 101 | 65 | 145 | 01100101 | 65 |
| l | 108 | 6c | 154 | 01101100 | 6c |
| l | 108 | 6c | 154 | 01101100 | 6c |
| o | 111 | 6f | 157 | 01101111 | 6f |
| , | 44 | 2c | 54 | 00101100 | 2c |
| space | 32 | 20 | 40 | 00100000 | 20 |
| W | 87 | 57 | 127 | 01010111 | 57 |
| o | 111 | 6f | 157 | 01101111 | 6f |
| r | 114 | 72 | 162 | 01110010 | 72 |
| l | 108 | 6c | 154 | 01101100 | 6c |
| d | 100 | 64 | 144 | 01100100 | 64 |
| ! | 33 | 21 | 41 | 00100001 | 21 |
Code point or byte: which do you want?
- Code point is the number that identifies a character (JavaScript codePointAt, Python ord). The letter A is 65 in every base view.
- UTF-8 byte is how the character is stored. A is one byte (65), but a character like e with an accent is two bytes, and most emoji are four.
- For text limited to the ASCII range (0 to 127) the two are the same, which is why this is usually called text to ASCII.
- Decoding bytes runs strict UTF-8 validation, so an incomplete multi-byte sequence is reported rather than silently mangled.
Accepted input when decoding
- Numbers separated by spaces, commas, semicolons, tabs, or new lines.
- A fixed base (Decimal, Hex, Octal, Binary) or Auto, which infers the base from the digits and any prefixes.
- Optional per-token prefixes: 0x and U+ for hex, 0o for octal, 0b for binary.
- The common reference points: A = 65, a = 97, 0 = 48, space = 32.
How to use
- Keep Text to codes selected to encode, then type or paste your text into the box.
- Pick the number base you want: decimal, hexadecimal, octal, or binary. Choose a separator (space, comma, or new line) for the output.
- Read the flat list of codes and the per-character table below it, which also shows the UTF-8 bytes for each character, then copy the result.
- For characters above code 127, switch Code meaning to UTF-8 byte to see the stored bytes, or leave it on Unicode code point to see one number per character.
- To go the other way, switch to Codes to text, paste a list of numbers, and choose the base or leave it on Auto. The decoded text appears with a Copy button, and any invalid token is flagged with its position.
About this tool
Text to ASCII Code Converter turns any text into the numeric character codes behind each character, and turns a list of codes back into readable text, in four bases at once: decimal, hexadecimal, octal, and binary. ASCII code is the name most people search for, and for the ASCII range (0 to 127) it is exact: A is 65, a is 97, the digit 0 is 48, and a space is 32. Because real text often contains characters above that range (accented letters, currency symbols, emoji), the tool is careful about what a character code actually means and lets you choose between two honest views. The code point view reports the Unicode scalar value of each character, the same number JavaScript codePointAt and Python ord return, so one character is always one number. The UTF-8 byte view reports the actual bytes the character occupies when it is stored or sent, which is what a hex dump or a byte-oriented protocol sees; there, a non-ASCII character expands into two, three, or four bytes. For plain ASCII the two views are identical, which is why text to ASCII is a fair description for the everyday case. Encoding iterates the string by code point rather than by UTF-16 unit, so emoji and other astral characters are never split into broken halves, and the result is shown both as a flat copyable list and as a per-character table giving the decimal, hex, octal, and binary code alongside the raw UTF-8 bytes. Decoding is deliberately forgiving on input: paste codes separated by spaces, commas, semicolons, tabs, or new lines, pick a fixed base or let Auto infer it from the digits, and optional per-token prefixes (0x and U+ for hexadecimal, 0o for octal, 0b for binary) are understood. Each token is validated against the active base, code points are range-checked against the valid Unicode range (surrogate values are rejected), byte values are checked to fit in a single byte, and a decoded byte stream is run through strict UTF-8 decoding so an incomplete multi-byte sequence is reported with a clear message rather than silently producing replacement characters. When a token is wrong the error names its position and says exactly which digits the chosen base allows. Everything is computed in your browser with built-in encoder and decoder APIs, so the text or codes you paste are never uploaded, logged, or sent anywhere.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Binary Translator
Bidirectional text and binary translation with UTF-8 byte breakdown.
Open tool
ConverterHex to Text Converter
Bidirectional hex and text converter with UTF-8 bytes and a hex dump view.
Open tool
DeveloperASCII Table
Searchable ASCII reference plus a two-way text-to-code converter.
Open tool
ConverterNumber Base Converter
Binary, octal, decimal, hex, and custom-base conversion with two's complement.
Open tool
TextUnicode Character Inspector
Per-character breakdown with code points, UTF-8/UTF-16 bytes, and hidden character detection.
Open tool
TextCase Converter
Convert text between six common cases at once.
Open tool