Text To ASCII
Convert text characters to their ASCII numeric codes. Each character becomes a number 0-127 (or higher for Unicode).
Share on Social Media:
Text to ASCII Converter — See the Numbers Behind Your Text
Type the word Hi and a computer doesn't store the letters at all — it stores 72 105. This Text to ASCII converter pulls back that curtain: paste any letter, word, sentence, or symbol and it returns the exact ASCII code for every character, including the spaces and line breaks you can't see. Pick decimal (65), hexadecimal (0x41), or binary (01000001), and the mapping updates as you type.
It runs entirely in your browser — no install, no account, no limit on how much you paste — which makes it equally good for a one-character lookup ("what's the code for a comma again?") and for dumping a 500-line config file to hunt down a single stray control character. If you've ever searched "convert text to ASCII code", "string to ASCII", or "ASCII converter online", this is the fast, accurate version of that.
How to Convert Text to ASCII (Step by Step)
- Enter your text. Type into the input box or paste a word, sentence, or whole paragraph. One character or ten thousand — it makes no difference to the tool.
- Choose your output format. Decimal (
65) is what most people mean by "the ASCII code." Hexadecimal (41) is what you'll see in hex editors and HTML entities. Binary (01000001) shows the raw bits. - Read the result. Every character is mapped in order — letters, digits, spaces, tabs, punctuation — so nothing is silently skipped.
- Copy and use it. One click copies the full output into your code, spreadsheet, message, or puzzle solver.
A quick worked example. Type Cat! in decimal and you get:
C→ 67a→ 97t→ 116!→ 33
Switch the format to binary and the same word becomes 01000011 01100001 01110100 00100001 — four eight-bit chunks, one per character. Switch to hex and it's 43 61 74 21. Same text, three views of how it's stored.
What Is ASCII? A Quick, Clear Explainer
ASCII stands for the American Standard Code for Information Interchange. It's a character-encoding standard from the 1960s that assigns a unique number from 0 to 127 to each letter, digit, punctuation mark, and control instruction used in basic English. Capital "A" is 65, lowercase "a" is 97, the digit "0" is 48, and a plain space is 32.
The first 32 codes (0–31) plus code 127 are control characters — non-printing instructions like line feed, carriage return, or tab that tell a device how to behave rather than what to show. Codes 32 through 126 are the printable characters you actually see: the alphabet in both cases, the digits, and symbols like ! @ # $ % & * ( ). Because the whole standard is 7-bit, every classic ASCII character fits inside a single byte — which is exactly why it became the bedrock of computing.
Modern text usually uses Unicode (most often as UTF-8), which reaches far beyond ASCII to cover emoji, accented letters, and every world script. The neat part: UTF-8 was built to be backward compatible, so the first 128 Unicode code points are identical to ASCII. When you convert plain English, the ASCII value and the Unicode code point are the same number.
Decimal, Hexadecimal, and Binary — and When to Use Each
The same character can be written in three number systems, and the right one depends on what you're doing:
- Decimal (base 10) — "A" is 65. Reach for this when you're reading a value out loud, teaching, or solving a puzzle that lists numbers like
72 73. - Hexadecimal (base 16) — "A" is 0x41. Use hex when you're matching what a hex editor shows, writing an HTML numeric entity (
A), or sharing byte values with another developer where compactness matters. - Binary (base 2) — "A" is 01000001. Use binary when you need to see the actual bits — for example, to demonstrate that flipping the sixth bit (value 32) is what turns uppercase into lowercase.
Here's that case-flip trick made concrete. Uppercase "A" is 01000001 and lowercase "a" is 01100001. The only difference is the single bit worth 32. That's not a coincidence — it's why 97 − 65 = 32 for every letter pair, and it's exactly the kind of pattern that becomes obvious the moment you flip the converter to binary.
Walkthrough: Decoding a Hidden Number Message
Say a puzzle hands you this string: 72 101 108 108 111. Where does the meaning live? Treat each number as an ASCII code and reverse it: 72 is "H", 101 is "e", 108 is "l", 108 is "l" again, 111 is "o" — the word is Hello. Many beginner ciphers, capture-the-flag tasks, and "decode this" challenges hide text exactly this way, as a list of decimal codes.
Going the other direction is just as common. To encode FLAG into numbers, type it here in decimal and you get 70 76 65 71 — F is 70, L is 76, A is 65, G is 71. Notice they're all in the 65–90 uppercase band, a quick sanity check that you typed all caps. If one number had landed at, say, 102, you'd know a lowercase "f" slipped in.
Why Convert Text to ASCII? Real-World Use Cases
Turning text into codes solves concrete problems, not just classroom ones:
- Hunting invisible characters. A string comparison fails for no visible reason. Paste both versions here and the codes reveal the culprit — a non-breaking space (160) masquerading as a normal space (32), or a trailing tab (9).
- Diagnosing smart quotes. A word processor silently swaps a straight apostrophe (39) for a curly one (8217). Your code chokes on it; the converter shows the mismatch in one glance.
- Building lookup tables. Writing a parser that branches on a delimiter? Confirm the exact code of your separator — a comma is 44, a tab is 9, a pipe is 124 — before you hard-code it.
- Teaching and learning. Watching letters turn into numbers in real time makes "computers store text as numbers" click in a way a static chart never does.
- Puzzles and CTF challenges. Encode a flag into numbers, or decode one someone handed you, without writing a single line of code.
- Fixed-format data files. When a legacy system expects specific byte values in specific positions, the ASCII codes are your ground truth.
Edge Cases Worth Knowing About
A converter is only useful if you trust it on the weird inputs. Here's what happens at the boundaries:
- Emoji and accented letters go above 127. Type "café" and the "é" won't return a tidy 0–127 number — it's Unicode code point 233 (and two bytes in UTF-8). An emoji like 😀 sits far higher still. That's expected: those characters were never part of standard ASCII.
- Whitespace counts. A trailing space, a tab between words, or an accidental double space all appear in the output. If
"hello "produces one more code than"hello", you've just found a trailing space. - Line breaks have codes too. Press Enter in the input and you'll see 10 (line feed). Text copied from a Windows source may show 13 then 10 (carriage return + line feed) — the classic CRLF that trips up cross-platform diffs.
- The space character is real. 32 is a genuine character, not "nothing." Beginners are often surprised the gap between words has a code at all.
Convert ASCII Back to Text
The trip runs both ways. If you already have a list of ASCII numbers and want them back as readable words, the companion ASCII to Text tool reconstructs the original characters — paste 84 111 111 108 115 and get back "Tools." Pairing the two lets you encode a message into numbers and decode it again, which is handy for learning, lightweight obfuscation in a puzzle, or proving a round-trip preserved your data byte-for-byte.
Common ASCII Codes Worth Memorizing
A handful of values come up so often they're worth keeping in your head:
- 48–57 — digits "0" through "9". Subtract 48 from a digit's code to get its numeric value, a trick used in countless parsers.
- 65–90 — uppercase "A" through "Z".
- 97–122 — lowercase "a" through "z", each exactly 32 above its uppercase twin.
- 32 — the space.
- 9, 10, 13 — tab, line feed, carriage return: the control characters you'll meet most.
- 33–47, 58–64, 91–96, 123–126 — the four bands that hold punctuation and symbols.
The encoding isn't random, and seeing the structure — letters in alphabetical runs, digits in a tidy block — tells you a lot about how computers were designed to process text.
Checking Your Code Against the Converter
Almost every language exposes ASCII conversion through a tiny built-in, and this tool is a fast way to confirm you've got it right. In Python it's ord('A') → 65 and chr(65) → "A". JavaScript uses 'A'.charCodeAt(0) and String.fromCharCode(65). C and C++ treat a char as its integer value directly. Java uses (int) 'A'. When you're debugging encoding logic, pasting your string here gives you a trustworthy reference to compare against — no need to spin up an interpreter just to check one value.
Standard ASCII vs. "Extended ASCII"
Standard ASCII is 7-bit and defines codes 0–127. Since a byte holds 8 bits, early systems had one spare bit and various vendors filled 128–255 with extra symbols — accented European letters, currency signs, box-drawing characters. These 8-bit schemes are loosely called extended ASCII, but there was never one agreed version: code 200 might be one symbol on a DOS code page and something entirely different on a Windows code page. That ambiguity is a big reason the world moved to Unicode. For predictable, universal values, stay inside 0–127; for anything above that, think in Unicode and UTF-8, not "extended ASCII."
A Short History of ASCII
ASCII was developed in the early 1960s by the American Standards Association (later ANSI) to fix a real headache: different manufacturers used different, incompatible codes for characters, so a machine from one vendor couldn't reliably exchange text with another. The first edition appeared in 1963, with a major, widely adopted revision in 1967. By standardizing a single 7-bit code for 128 characters, ASCII let teletypes, terminals, printers, and computers from many companies finally speak the same language.
That choice had staying power. Decades later ASCII is still the common denominator of digital text. When UTF-8 was designed in the 1990s, its creators deliberately made the first 128 values identical to ASCII so the entire existing body of text and software kept working unchanged. Every time you use a converter like this, you're working with a standard that has quietly underpinned computing for more than half a century.
Tips for Working with ASCII
- Suspect copy-pasted text. It often carries non-breaking spaces (160) that look identical to real spaces but break comparisons. Converting to codes exposes them at once.
- Watch for smart quotes. Curly quotes are Unicode characters above 127, not the straight ASCII 34 and 39 your code expects.
- Normalize line endings. Windows uses CR+LF (13, 10), Unix uses LF alone (10). Seeing the codes is the fastest way to diagnose a mismatched-newline bug.
- Default to hex when sharing. When passing byte values to another developer, hexadecimal is the least ambiguous, most conventional format.
Related Tools You May Find Useful
If you work with character codes and encodings, these free Tools Hub utilities pair naturally with this one:
- ASCII to Text — reverse the process and rebuild words from a list of codes.
- ASCII to Binary and Binary to ASCII — move between ASCII codes and their binary form.
- Text to Binary and Binary to Text — convert words directly to and from ones and zeros.
- Decimal to Hex and Hex to Binary — switch between number bases on their own.
- URL Encoder Decoder and Base64 Encode Decode — for web-safe encoding tasks built on the same character fundamentals.
Frequently Asked Questions
Is this text to ASCII converter really free?
Yes. Converting text to ASCII codes is completely free, with no sign-up, no watermark, and no daily limit.
What does ASCII stand for?
ASCII stands for the American Standard Code for Information Interchange, a standard that assigns a number from 0 to 127 to each basic English character and control instruction.
What is the ASCII code for the letter A?
Capital "A" is ASCII 65 in decimal, 0x41 in hexadecimal, and 01000001 in binary. Lowercase "a" is 97.
Can I convert ASCII codes back into text?
Yes. Use our ASCII to Text tool to paste a list of ASCII numbers and rebuild the original characters.
Does it work with numbers and symbols?
Absolutely. Digits 0–9, punctuation, and symbols all have ASCII codes, and the converter maps every one of them accurately.
Why do my emoji or accented letters give large numbers?
Standard ASCII only defines 0–127. Emoji, accented letters like é, and non-Latin scripts are Unicode characters and produce code points above 127, often shown as their Unicode value or a multi-byte UTF-8 sequence.
Why are there codes for spaces and line breaks?
Spaces (32), tabs (9), and line feeds (10) are real characters with their own ASCII codes. The converter includes them so the mapping is complete — which is exactly what you need when hunting for invisible whitespace.
Can I see the output in binary or hexadecimal?
Yes. Choose decimal, hexadecimal, or binary, and the tool displays the ASCII value of each character in that format.
Is my text safe?
Your text is converted in your browser and is not stored, shared, or sold. No account is required to use the tool.
How many characters does standard ASCII define?
Standard ASCII defines 128 characters, numbered 0 to 127. Codes 0–31 and 127 are non-printing control characters, while 32–126 are the printable letters, digits, punctuation, and symbols you see on screen.
What is the highest standard ASCII value?
The highest standard ASCII code is 127, the delete control character. Any value above 127 belongs to extended encodings or Unicode rather than standard ASCII.
🔗 Relevant Tools
Link to this tool
Found this tool useful? Add it to your website or blog with one of these snippets.
Add the live, working tool to your own page:
Leave a comment
Comments go straight to our team — they are not published on the site.