Text to ASCII Converter – Convert Text to ASCII Online

Instantly convert text strings into ASCII character codes in Decimal (0–255), Hexadecimal (00–FF), Binary (8-bit), or Octal (000–377)—or decode ASCII numbers back into readable text. Includes customizable delimiters, prefixes (0x, 0b, 0o), UTF-8 / Unicode support, and a live ASCII Character Breakdown Inspector.

Input Characters: 0

Output Codes: 0

Non-ASCII (>127): 0

ASCII Character & Code Inspector

Enter text or ASCII codes above to inspect each character’s Decimal, Hexadecimal, Octal, Binary, and ASCII Category.

How to Convert Text to ASCII Codes

  1. Enter Your Text – Type or paste any text into the Source Input field, or click Sample Text to test immediately.
  2. Choose Your Number Base – Select Decimal (base 10), Hexadecimal (base 16), Binary (base 2), or Octal (base 8).
  3. Customize Separator & Prefix – Separate codes with spaces, commas, semicolons, newlines, or custom strings, and optionally add programmer prefixes (0x, 0b, 0o) or zero-padding.
  4. Inspect & Export – Review every character's exact code across all 4 bases simultaneously in the ASCII Character & Code Inspector, then click Copy to Clipboard or Download .txt.

Standard ASCII Reference Table (Control & Printable Characters)

ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding standard that assigns numeric values from 0 to 127 to control characters, whitespace, digits, letters, and punctuation:

ASCII Range Categoria Characters / Examples Decimal Hexadecimal 8-Bit Binary
Control Codes Non-Printable NUL (0), \t Tab (9), \n LF (10), \r CR (13), ESC (27) 0 – 31 00 – 1F 00000000 – 00011111
Space Whitespace (Standard Space) 32 20 00100000
Digits Numeric 0 through 9 48 – 57 30 – 39 00110000 – 00111001
Uppercase Latin Alphabet A through Z 65 – 90 41 – 5A 01000001 – 01011010
Lowercase Latin Alphabet a through z 97 – 122 61 – 7A 01100001 – 01111010
Delete Control Code DEL 127 7F 01111111
Extended / UTF-8 8-Bit / Multi-Byte Accented letters (é, ñ), currency (€), emojis (🚀) 128 – 255 80 – FF 10000000 – 11111111

Converting Text to ASCII in Popular Programming Languages

  • JavaScript / TypeScript: Use "A".charCodeAt(0) (returns 65) or new TextEncoder().encode("Hello") for a Uint8Array of UTF-8 byte values.
  • Python: Use ord('A') (returns 65) or list("Hello".encode('utf-8')) to get [72, 101, 108, 108, 111].
  • C / C++: Characters are already stored as integer byte values—(int)'A' evaluates directly to 65.

Perguntas frequentes

What are the ASCII codes for Space, Enter (Newline), and Tab?

In ASCII, a Space () is decimal 32 (0x20), a Line Feed / Newline (\n) is decimal 10 (0x0A), a Carriage Return (\r) is decimal 13 (0x0D), and a Horizontal Tab (\t) is decimal 9 (0x09).

Why is 'A' equal to 65 and 'a' equal to 97 in ASCII?

The 7-bit ASCII specification positioned uppercase letters at 65–90 and lowercase letters at 97–122 so that every lowercase letter is exactly 32 (25) greater than its uppercase equivalent. This allows case conversion in hardware or assembly by toggling a single bit!

How does this tool handle emojis and non-English characters?

You can choose how characters above 255 are processed using the Characters > 255 (Unicode) setting: encode them as standard UTF-8 Bytes (0–255), output their full Unicode Code Point (e.g., 128640 for 🚀), or Skip / Ignore them when strict 8-bit filtering is needed.