Text to ASCII Code Converter
Convert text characters to their ASCII/Unicode code values and vice versa
Character Inspector
ASCII Reference Table
| Dec | Hex | Oct | Char | Description |
|---|
Turn any text into its decimal, hex, octal, or binary ASCII codes — or paste codes and get readable text back. Click any character to inspect its full breakdown, including Unicode name and UTF-8 bytes. And everything runs in your browser. Nothing gets uploaded.
How It Works
Each character in your text maps to a number in the ASCII standard (0 through 127 for standard, 128-255 for extended). The tool reads every character, grabs its numeric code using JavaScript's charCodeAt(), then formats it as decimal, hexadecimal, octal, or binary — whichever you picked. The reverse mode does the opposite: it splits your number list by the chosen separator, converts each back to a character, and gives you the text.
Examples
Converting a Greeting to Decimal
Quick check — what are the ASCII codes for a simple word?
Hello
72 101 108 108 111
Hex Codes for a Serial Command
You're writing firmware and need hex values for a command string sent over UART.
AT+OK\r\n
41 54 2B 4F 4B 0D 0A
Decoding a Binary Dump Back to Text
Someone sent you raw binary values from a packet capture and you need to read the actual message. Switch to "ASCII to Text" mode, paste the binary, done.
01001111 01001011
OK
Who Uses This
Debugging encoding issues in APIs, protocols, and data pipelines where a stray character breaks everything.
Inspecting payloads and packet data during forensic analysis or CTF challenges.
Learning how computers represent text as numbers in intro computer science courses.
Building serial command strings where you need exact hex or decimal byte values for hardware communication.
Common Mistakes
Characters 0-127 are identical in both. But once you go beyond that — accented letters, emojis, CJK characters — the numbers you see are Unicode code points, not ASCII. If a spec asks for strict ASCII, stick to the 0-127 range.
Pasting codes separated by commas when the tool expects spaces (or the other way around) will give you garbage output. Match the separator dropdown to however your codes are actually delimited.
Tabs, carriage returns, and newlines are real characters with real ASCII codes (9, 13, 10). If your output has more codes than visible characters, that is probably why. Click any character in the input to inspect it.
Technical Details
- Processing: 100% client-side JavaScript
- Character Range: Full Unicode support (ASCII 0-127, Extended 128-255, and beyond)
- Output Formats: Decimal, Hexadecimal, Octal, Binary
- Browser Support: Chrome, Firefox, Safari, Edge
- Max Input: Limited only by your browser memory
Frequently Asked Questions
What is the ASCII code for the letter A?
Uppercase A is 65 in decimal, 41 in hex, 101 in octal, and 01000001 in binary. Lowercase a is 97 (decimal). The difference between any uppercase letter and its lowercase version is always 32 — a quirk of how the ASCII table was designed.
How do I convert text to ASCII in Python?
Use ord('A') to get 65, or [ord(c) for c in "Hello"] for a whole string. Going the other way, chr(65) returns 'A'. This tool does the same thing but without writing any code — paste your text and copy the result.
What is the difference between ASCII and UTF-8?
ASCII uses one byte per character and covers 128 characters. UTF-8 is a variable-length encoding that uses 1 to 4 bytes — it's backwards compatible with ASCII for the first 128 characters, but can represent every Unicode character. Most of the web runs on UTF-8 today.
Can I convert emojis to ASCII?
Emojis aren't part of ASCII — they exist in the Unicode range far above 127. This tool will still convert them and show their Unicode code point values. Just know that what you're seeing is a Unicode number, not a traditional ASCII code.
Why does my text show more codes than characters?
Invisible characters. Newlines, tabs, carriage returns, zero-width spaces — they all have codes but you can not see them in the text. Click on the suspicious area in the input panel. The Character Inspector will show you exactly what's there, including the character name and all its numeric representations.