ASCII converter
Text never leaves this browserPaste text and get its code points in decimal, hex, binary or octal, or paste those codes back into characters. ASCII is the range 0 to 127; anything beyond is a Unicode scalar value, not a UTF-16 code unit, so a single emoji stays one number. The work runs in this tab, so nothing is uploaded. This is not the image-to-ASCII art page.
How to use it
- Paste text, drop a .txt file, or try the sample. To go the other way, choose Codes to text and paste numbers.
- Pick decimal, hex, binary or octal. For text to codes, you can add a prefix (0x, U+, 0b, 0o or an HTML entity) and a separator.
- Copy or download the result. Open the ASCII table (0–127) for official Unicode names and the traditional abbreviations (NUL, LF, DEL).
Details
- How it is converted
- Each item is a Unicode scalar value (the same unit as String.fromCodePoint), not a UTF-16 code unit. A character such as an emoji that is two UTF-16 units is still one number
- ASCII
- Values 0 to 127 are ASCII. The table on this page uses official Unicode names (NULL, LINE FEED (LF), DELETE) and the traditional ASCII abbreviations (NUL, LF, DEL)
- Bases and prefixes
- Decimal, hex, binary and octal. Pasted codes may use 0x, 0b, 0o, U+, \u{…}, \uXXXX, \xNN or HTML entities; a prefix overrides the selected base
- Limits
- Up to 100,000 characters or codes, and files up to 1 MB
Questions
Are my files uploaded?
No. The page loads its code once, then reads and processes your files inside the browser tab. Nothing is sent to a server; you can confirm it in your browser's network panel while a file is processed.
How is this different from Image to ASCII?
That page turns a picture into character art. This page turns text into code-point numbers, and numbers back into text. They are different jobs.
Is this only 7-bit ASCII?
ASCII itself is 0 to 127, and the built-in table covers that range. The converter also accepts Unicode scalar values so you can inspect or rebuild text that includes é or an emoji. Tick ASCII only if you want values above 127 omitted.
Why is an emoji one number, not two?
Some converters use JavaScript's charCodeAt, which reports UTF-16 code units. This page reports scalar values, the numbers Unicode assigns. A thumbs-up emoji is U+1F44B, one value, even though UTF-16 stores it as a surrogate pair.
What prefixes can I paste?
Hex with 0x or U+, binary with 0b, octal with 0o, CSS-style \u{…}, \uXXXX, \xNN, and HTML entities such as A or A. A recognised prefix is used even if another base is selected. Bare numbers follow the base you picked.
Is there an API?
Yes. The MCP server on this site has an ascii_converter tool that can encode text, decode codes, or return the ASCII 0–127 table (official Unicode names and traditional abbreviations). It does not store the input.