ASCII Converter
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free ASCII converter. Turn text into ASCII and Unicode character codes in decimal, hexadecimal or binary, or decode a list of codes back into text.
- Characters
- 0
- Outside ASCII (above 127)
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the ASCII converter
Text to codes:
- Choose "Text to codes".
- Choose the number format: decimal, hexadecimal or binary.
- Type or paste your text.
Codes to text:
- Choose "Codes to text".
- Choose the format your codes are in.
- Paste the codes, separated by spaces or commas.
The ASCII converter shows the result, ready to copy, the number of characters, and how many characters fall outside the ASCII range.
What is ASCII?
ASCII, the American Standard Code for Information Interchange, is a character encoding first published in 1963. It assigns a number from 0 to 127 to each of 128 characters:
- 0 to 31 and 127: control characters, such as line feed (10) and carriage return (13), originally used to control teleprinters.
- 32: the space.
- 33 to 47, 58 to 64, 91 to 96 and 123 to 126: punctuation and symbols.
- 48 to 57: the digits 0 to 9.
- 65 to 90: the capital letters A to Z.
- 97 to 122: the lowercase letters a to z.
ASCII became the foundation of almost all modern text encoding. Unicode, the standard used by today's computers and the web, keeps the same numbers for the first 128 characters, so ASCII codes are still valid everywhere.
How the ASCII converter works
Text to codes: each character is replaced by its code number, written in the chosen base:
- Decimal: base 10, such as 72.
- Hexadecimal: base 16, two digits for ASCII characters, such as 48.
- Binary: base 2, eight digits for ASCII characters, such as 01001000.
Codes to text: each number is read in the chosen base and turned back into its character.
With the default text, "Hi!":
| Character | Decimal | Hex | Binary |
|---|---|---|---|
| H | 72 | 48 | 01001000 |
| i | 105 | 69 | 01101001 |
| ! | 33 | 21 | 00100001 |
So "Hi!" in decimal is 72 105 33.
A worked example: decoding binary
You're given the binary codes 01001000 01101001.
- 01001000 in binary is 72, the letter H.
- 01101001 is 105, the letter i.
The message is "Hi". Choose "Codes to text" and binary in the ASCII converter and paste the codes to check.
Useful patterns in ASCII
ASCII was designed with some handy patterns:
- Capital and lowercase letters differ by exactly 32. A is 65 and a is 97; in binary, only one bit changes. That made converting case simple for early computers.
- Digits start at 48. The digit 0 is 48, so a digit's code minus 48 gives its value.
- Letters are in alphabetical order, so sorting by code sorts alphabetically, at least for one case.
These patterns explain why sorting text by code puts all capital letters before all lowercase ones: "Zebra" comes before "apple".
Beyond ASCII: Unicode
ASCII covers only English letters and basic symbols. Accented letters, other alphabets, symbols like €, and emoji aren't part of it. Unicode extends the numbering to over a million possible code points, covering virtually every writing system. The ASCII converter shows characters outside ASCII as their Unicode code points: for example, € is 8364 in decimal (U+20AC), and é is 233.
When stored in files or sent over the internet, Unicode text is usually encoded as UTF-8, which uses one byte for ASCII characters and two to four bytes for others. That's why ASCII text is also valid UTF-8, one of the reasons UTF-8 became the web's standard encoding. Our unicode converter shows code points and encodings in more detail.
Who uses an ASCII converter
Programmers use it to debug text processing and encoding issues. Students use it to learn how computers represent text. Puzzle and escape room designers use it to create coded messages. Cybersecurity learners use it in capture-the-flag challenges, and electronics hobbyists use it when sending text to microcontrollers and displays.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.
Control characters
The first 32 ASCII codes are control characters that don't print as visible symbols. The ones you'll meet most are:
- 9: horizontal tab.
- 10: line feed, the newline on Linux and macOS.
- 13: carriage return; Windows uses 13 followed by 10 for a new line.
- 0: null, used to mark the end of strings in some programming languages.
If you convert text containing line breaks, the ASCII converter shows 10 (or 13 10) where each break was.
Common mistakes
- Choosing the wrong base when decoding, so 72 is read as hex.
- Expecting accented letters to have ASCII codes; they're Unicode.
- Mixing up line ending codes between operating systems.
- Leaving out separators between codes when decoding.
The ASCII table at a glance
Some codes worth remembering:
| Character | Decimal | Hex |
|---|---|---|
| Space | 32 | 20 |
| 0 | 48 | 30 |
| 9 | 57 | 39 |
| A | 65 | 41 |
| Z | 90 | 5A |
| a | 97 | 61 |
| z | 122 | 7A |
| ~ | 126 | 7E |
With these anchors, you can work out any letter or digit: H is the eighth letter, so its code is 65 + 7 = 72, and h is 72 + 32 = 104. The ASCII converter gives every code instantly, but knowing the pattern helps when reading raw data.
Where you'll see character codes
Character codes appear in many places:
- URLs: special characters are written as a percent sign followed by their hex code, such as %20 for a space. Our URL encoder/decoder handles this.
- HTML: characters can be written as numeric entities, such as
Afor A or€for €. - Programming: many languages let you write characters as hexadecimal escape codes, such as
\x41for A. - Hex dumps: tools that show the raw bytes of a file display ASCII text as hex codes, often alongside the readable characters.
Being able to switch between text and codes with the ASCII converter helps when reading any of these.
Extended ASCII and code pages
Because ASCII uses only 7 bits, computers storing text in 8-bit bytes had 128 extra codes to spare. Different systems used them for different characters, accented letters, box-drawing symbols or other alphabets, in incompatible "extended ASCII" code pages, such as Windows-1252 and ISO 8859-1. Text saved in one code page and opened in another could turn into strange symbols, a problem often called mojibake. Unicode and UTF-8 solved this by giving every character a single, universal number. When you see garbled characters on a web page, an encoding mismatch is often the cause.
Fun with binary
Binary codes for letters are a popular way to make puzzles, decorations and gifts, such as a name knitted, beaded or engraved in ones and zeros. Each ASCII character takes 8 binary digits, so a five-letter name needs 40 bits. Convert a name with the ASCII converter set to binary to see the pattern, and use it as a hidden message in a design.
Checking for hidden characters
Text copied from websites, PDFs and word processors sometimes contains characters you can't see, such as non-breaking spaces (code 160), zero-width spaces (8203) or curly quotation marks (8216 to 8221) instead of straight ones (39 and 34). These can break code, spreadsheets and data imports. Pasting the text into the ASCII converter reveals them: any code above 127 is outside ASCII and is counted in the "Outside ASCII" figure. Once you know they're there, you can replace them with ordinary characters. Our invisible character generator works in the other direction, producing such characters on purpose.
Converting long text
The ASCII converter handles text of any length, from a single character to whole paragraphs. For long passages, binary output gets long quickly, since every character becomes eight digits, so decimal or hexadecimal is usually easier to read and share.
Privacy
The ASCII converter runs entirely in your browser, so the text you convert isn't uploaded anywhere. That makes it safe to use for checking snippets of code, data files or messages, though for sensitive data it's still sensible to use only what you need.
Sources and further reading
- ASCII on Wikipedia: the history and the full code table.
- Unicode on Wikipedia: the standard that extends ASCII to every writing system.
- UTF-8 on Wikipedia: how Unicode text is stored, and why it's compatible with ASCII.
Frequently asked questions
What is the ASCII code for A?
65 in decimal, 41 in hex, 01000001 in binary.
What is "Hi!" in ASCII?
72 105 33 in decimal.
How many characters does ASCII have?
128, numbered 0 to 127.
What's the difference between ASCII and Unicode?
ASCII covers 128 basic characters; Unicode covers virtually every writing system and keeps ASCII's first 128 codes.
Why are capital and lowercase letters 32 apart?
ASCII was designed so case differs by a single bit.
Is the ASCII converter free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.