Text to Decimal Converter

Text to Decimal Converter. Type your text into Text Input and the Text to Decimal Converter instantly returns each character's Decimal Output. The fastest way to compute a hex value's two's complement at a specific bit width is the hex twos complement calculator.

Need to see what your words look like to a machine? This text to decimal converter turns every character you type into its numeric code, so you convert text to its corresponding decimal representation in one click. It is a free online tool for developers, students and curious readers who want to read, check or share the decimal ASCII values behind a string.

How the ASCII Text to Decimal Converter Works

Computers cannot store letters directly; they store numbers, and a character encoding is the agreed list that pairs each symbol with one of them. The ASCII text to decimal converter reads each character of text you enter, looks up its position in that list and prints the matching number in the decimal system. Because the same character always maps to the same number, the tool gives identical output on every machine, which is exactly why decimal code is such a dependable way to describe text.

Behind the scenes the tool does no arithmetic on your text at all. It is a lookup, one character of text at a time, followed by a join that places a separator between the numbers, so you can encode a word, a sentence or a whole document the same way. That simplicity is what makes the result easy to verify by hand with any reference chart.

Convert Text to Decimal in Three Steps

  1. Paste or type your text into the input box, which accepts plain text only. Letters, digits, punctuation and symbols are all accepted, and the input can be a single character or several paragraphs.
  2. Click the Convert button. The tool will encode every character of the text at once and writes the output directly beneath the input text.
  3. Copy the decimal numbers. Each value is separated by a space so you can paste the whole sequence into code, a spreadsheet or a message.

Choosing separate decimal numbers by a space keeps the output readable, because without a separator the digits of neighbouring characters run together and you cannot tell where one code ends. Switch the separator off only when another program expects one unbroken digit string.

Reading the Decimal Code Output

Every number in the output is one character. A two-digit value such as 32 is usually a space, a three-digit value such as 101 is usually a lowercase letter, and anything above 127 means the character sits outside the original ASCII range. Count the numbers and you have counted the characters, which makes the output a handy way to spot a hidden trailing space or an unexpected symbol.

Text to Decimal Conversion: Characters, ASCII and Unicode

Every text to decimal conversion rests on a published standard. The American Standard Code for Information Interchange began as a set of telegraphic codes and became the common language of electronic communication between computers. It defines 128 characters, each with a number from 0 to 127, and the English alphabet occupies two neat blocks of that range. The hex to int c# pairs the numeric result with the Convert.ToInt32(hex, 16) snippet so you can copy working C# code directly.

Why Character Encoding Matters

Several character encodings exist, and a character encoding is the rulebook that turns symbols into numbers and back again. When two systems use different rulebooks, the same stored number shows up as a different letter, and you get garbled text; that is why you must always know how a piece of text was encoded before you decode it, and which standard to use when you encode new text. Knowing the exact decimal code lets you diagnose that kind of mismatch quickly, since you can compare the numbers instead of guessing at the symbols.

ASCII Table Ranges You Should Know

You do not need to memorise the full ASCII table; five ranges cover almost everything you will convert.

ASCII Table Ranges You Should Know
Decimal rangeWhat it containsExample
0 to 31Control characters (tab, line feed, carriage return)10 is a line feed
32SpaceBetween words
48 to 57Digits 0 to 957 is the digit 9
65 to 90Uppercase letters A to Z67 is C
97 to 122Lowercase letters a to z97 is a

Notice that an uppercase letter and its lowercase twin always differ by exactly 32, so converting between cases is a single subtraction or addition once you have the decimal numbers. Punctuation and other symbols fill the gaps between these blocks.

Unicode and the Code Point

Unicode extends the idea from 128 entries to more than a million. Each character receives a code point, a decimal value that fits inside the Unicode range of 0 to 1,114,111. The first 128 code points are identical to ASCII, so any plain English text produces the same decimal numbers in both systems. Characters such as accented vowels, currency signs and emoji live above 127, and this converter reports their full code point rather than truncating it.

Scale from 0 to 255 split at 127 showing five Café 9 characters in the ASCII range and é at 233 beyond it
Five of the six decimal codes for Café 9 are plain ASCII; only é at 233 needs Unicode.

UTF-8 and Storage

This converter prints the code point, not the UTF-8 bytes. UTF-8 is the most common way to place those code points in storage or on the wire. It keeps ASCII characters to a single byte and uses two to four bytes for the rest. The decimal code point you see in the output is therefore not the same thing as the byte values in a file, and mixing the two up is a classic source of confusion for anyone who works with Unicode characters.

Worked Example: Convert Text to Decimal for Café 9

To see the whole process, take the short string Café 9. It was chosen because it mixes an uppercase letter, lowercase letters, an accented character, a space and a digit. Entering it and pressing convert returns six decimal values, one per character. The fastest way to turn hex-encoded data back into plain text is to paste it into the hex to text converter.

Worked Example: Convert Text to Decimal for Café 9
CharacterDecimalHexadecimalBinary (8-bit)
C674301000011
a976101100001
f1026601100110
é233E911101001
(space)322000100000
9573900111001

The finished output is 67 97 102 233 32 57. The single formula behind every row is:

$$n = \operatorname{ord}(c)$$

where \(c\) is one character and \(n\) is its decimal code point. Applied to the whole string, you get the sequence \(n_1, n_2, \ldots, n_6\).

Grid of eight binary bits for each character of Café 9 with the é row highlighted
Each decimal code is one byte; add the bit weights marked 1 to get the number.

A Conversion Table for Common Characters

Use the table above as a miniature conversion table for your own checks: find the character, read across, and compare with what the tool printed. The accented letter is the interesting row, since 233 is above the ASCII range and proves the converter handles more than seven-bit text.

Check the Result Against the Decimal System

The decimal system is a positional, base 10 numeral scheme. Its radix is 10, it uses ten symbols from 0 to 9, and each digit is weighted by one of the powers of the base, a rule inherited from the Hindu-Arabic numeral system. You can confirm that the code for é is really 233 by expanding it:

$$233 = 2 \times 10^{2} + 3 \times 10^{1} + 3 \times 10^{0}$$

That is 200 + 30 + 3. The same expansion works for each of the other decimal numbers in the output, so you can trust the numeric result without any special equipment.

Waterfall chart adding 200, 30 and 3 to reach the decimal code 233
The code for é is 2 × 100 + 3 × 10 + 3 × 1 in the decimal system.

Debugging a Rejected Username with Text to Decimal Conversion

Priya Nair, a support engineer, is stuck on a ticket: a new customer named Renée cannot be added to a legacy billing system, which answers every attempt with "invalid character" and nothing more. The account username is Renée-04, and the vendor's documentation says only that usernames must be plain ASCII.

Instead of guessing, Priya pastes the username into the converter and clicks the Convert button. The decimal output reads 82 101 110 233 101 45 48 52. Eight characters give eight numbers, so no hidden space or line break is hiding in the pasted text.

Now she compares each number with the documented limit, which is 127 for 7-bit ASCII. Seven of the values sit comfortably inside it: 82 is R, 101 is e, 110 is n, 45 is the hyphen, and 48 and 52 are the digits 0 and 4. Only the fourth value, 233, is above the cutoff. The text to decimal conversion has pinpointed the culprit: the accented é at position four, a Unicode code point the old system cannot store.

  • Input: Renée-04 (8 characters)
  • Decimal output: 82 101 110 233 101 45 48 52
  • Values above 127: one, the 233 at position 4

The fix is specific. Priya changes the é to a plain e, which is 101, and converts the new username Renee-04 to confirm: 82 101 110 101 101 45 48 52, with every value now at or below 122. The billing system accepts it on the first try. She also adds the original spelling to the customer's profile notes, so the displayed name keeps its accent while the login stays within the ASCII range.

Decimal Values vs Binary, Hexadecimal and Octal

This tool prints the decimal form of each character code, but decimal is only one way to write it. The same code can be written in any base, and developers switch between them constantly. Look back at the worked table: 233, E9 and 11101001 are all the same number. Decimal is the friendliest for people, while the others suit hardware and low-level debugging.

Text to Binary and Text to Hex

Use text to binary when you want to see the individual bits, and text to hex when you need compact output for a colour code, memory dump or protocol trace. Binary uses only 0 and 1, so one byte takes eight digits, and hexadecimal uses 0 to 9 and A to F so one byte takes just two. Octal groups bits in threes and still appears in file permissions, while Base64 is a different idea again: it re-packs bytes into printable symbols for safe transport.

Decimal to Text: Going the Other Way

The reverse job, decimal to text, takes a list of numbers and rebuilds the original string. Give it 67 97 102 233 32 57 and it returns the same six characters of text you started with. That round trip is a quick sanity check: if decoding does not return your original text, either a number was changed or the two sides assumed different encodings.

Real-World Applications of Text to Decimal Conversion

The real-world applications of this skill are broader than they first appear. Anywhere a program needs to treat characters as numbers, a decimal code is the simplest common ground.

Text Processing and Data Analysis

In text processing, numeric codes make sorting, comparing and filtering trivial: a letter is a vowel or a digit based on whether its number falls inside a range. For data analysis, counting how many values exceed 127 tells you what share of a document is non-English. In natural language processing, decimal codes help with language detection and normalisation across a multilingual data set, and they are a cheap first step in algorithm design for cleaning messy text.

Encryption and Security

Classical ciphers work on numbers, not letters. A Caesar shift is just adding a constant to each decimal code, and a checksum is a sum over them. Anyone studying encryption or application security starts by turning the message into numbers, which is the exact job of this tool. Real systems use far stronger methods, but the first step is the same: take the converter's decimal list and work on the numbers. A Caesar shift of 3 turns A (65) into 68, which is D, and the same addition applies to every value in the output.

Python ord() and chr()

In Python the built-in ord() function returns the decimal code of a character and chr() returns the character for a code. Most other programming languages offer comparable functions, so you can reproduce what the online page does inside your own project. Use the converter to cross-check your script: if both agree for the same string, your logic is sound.

ASCII to Decimal Lookups You Can Do by Hand

You do not always have a browser open, and an ascii to decimal lookup by hand is a useful skill when you read a log file or a printed chart. The trick is to anchor on three landmarks: the digit 0 is 48, uppercase A is 65 and lowercase a is 97. Every other letter is an offset from one of those anchors, which turns a table with a hundred entries into three numbers and a little counting.

Suppose you want the code for the letter k. Lowercase a is 97 and k is the eleventh letter, so the offset is 10 and the result is 107. For an uppercase K the same offset from 65 gives 75. For a digit such as 6, add 6 to 48 and you reach 54. These patterns are why a single reference row is often all you need, and why a converter that prints the numbers is mostly a convenience for long strings rather than a necessity for short ones.

  • Digits: 48 plus the digit itself, so the output for any number written in text always lands between 48 and 57.
  • Uppercase letters: 64 plus the position in the alphabet, so Z, the twenty-sixth letter, is 90.
  • Lowercase letters: 96 plus the position in the alphabet, so z is 122.
  • Space and punctuation: memorise 32 for the space, then look the rest up in the table when you need them.

Working one letter at a time like this also explains why sorting text alphabetically and sorting its decimal codes give the same order for plain English: the codes rise with the alphabet inside each case. Mixed-case text is the exception, because every uppercase code is smaller than every lowercase code, so "Zebra" sorts before "apple" when you compare raw numbers.

Common Mistakes When You Convert Text to Decimal

Most surprises come from assumptions rather than from the converter itself. Reading through these cases before you rely on a result will save you a debugging session later.

Confusing a Digit Character with a Number

The text "9" is a character with the decimal code 57, while the number nine is a value. When you convert text that contains figures, the output shows the code of each digit, not the number it spells, so "42" becomes two codes, 52 and 50. If you need the number itself, you want a base converter rather than a character converter.

Forgetting That Case Changes the Code

Uppercase and lowercase versions of a letter are different characters with different codes, 32 apart. A comparison that ignores case will therefore need to normalise the text before it looks at any numbers, and a password check or key lookup that is case sensitive will treat the two forms as completely different inputs.

Mixing Up Code Points and Bytes

For characters under 128 the decimal code and the stored byte are the same. Above that, a single code point may occupy several bytes in UTF-8, so a six-character string can easily take seven bytes, as the accented example earlier shows. When another tool asks for bytes, give it bytes; when it asks for characters, give it code points. The converter prints code points, so Café 9 gives 233 for the accented letter, not the two UTF-8 bytes 195 and 169.

Trusting Pasted Text Blindly

Text copied from a web page or word processor often carries smart quotes, non-breaking spaces and zero-width characters. They look ordinary but convert to unfamiliar numbers such as 8217 or 160. If an output has values you cannot explain, search the list for the first unfamiliar number and trace it back to the exact character in the input.

Why Text to Decimal Conversion Starts with Stored Numbers

This converter works because every piece of text on a screen, from a one-word label to a long article, is stored as a list of numbers. When you type text, your keyboard sends a code, the program saves it, and a font later draws the matching shape. Text is therefore never really letters inside a computer; the letters are only what you see when the numbers are drawn.

Seeing that list is the point of this page. The text you paste in becomes a row of numbers, and the numbers tell you everything about the text: how long it is, which characters it uses, whether it contains plain text only or something unexpected. A line of text with forty visible characters and forty-one numbers is a line with one hidden character in the text, and you find it in seconds.

The same idea explains why text files are so small and so portable. A text file is just numbers, one per character, and any program that agrees on the encoding can read the text back. Plain text has no formatting, no fonts and no layout, so the decimal numbers are the whole story. When people say text is universal, this is what they mean: the numbers are the text, and every system can read the same numbers.

Use this view whenever text behaves strangely. If a search does not find text you can plainly see, convert the text and compare the numbers with those of the text you searched for. If two lines of text look identical but compare as different, their numbers will show where they differ. A difference of 32 between two letters means a case difference; a 160 in place of a 32 means a non-breaking space inside the text. Text that has been through several programs picks up these invisible changes, and the decimal list is the quickest way to expose them.

Teachers use the same approach to explain text to beginners: write a short word, convert the text, and ask learners to find each number in the table. It makes the link between text and numbers concrete in a few minutes, and the decimal list is easy to check by hand.

Best Practices for Accurate Decimal Representation

A few best practices keep results trustworthy, especially when you share them with another developer or paste them into another system.

Handling Non-Printable Characters

Some codes have no visible glyph. Non-printable characters such as tab (9), line feed (10) and carriage return (13) are all control characters, and they can sit unseen at the end of a copied line. If the output has more numbers than you expected, the extra values are usually one of these. The converter prints 9, 10 or 13 for these, so count the numbers to spot them. Check for 32 as well, since a stray space is the most common culprit.

Dealing with Multilingual Text

For scripts beyond Latin, the decimal values climb into the thousands, and each of them is one code point rather than one byte. The converter prints one decimal code point per character, for example 1076 for the Cyrillic letter д, so keep the encoding consistent from input to output, and avoid copying numbers between tools that assume different encodings. Doing so prevents most errors, and it keeps the data interoperable between programs.

Choosing the Right Separator and Format

With the converter's separator option, pick a single format and stay with it: a space between numbers for people, a comma for spreadsheets, no separator only for strict parsers. Whenever you share numerical output, say which encoding produced it, so the next reader can decode it without guessing. These small habits matter more than any option the page offers, because they make manipulation of the result predictable.

Preparing Your Input to Convert Text to Decimal

A little preparation makes the output of any text conversion easier to trust. Start by deciding what the text should contain: if the text is a password hint, a sample sentence or a line of source code, copy only that text and nothing around it. Extra text from a web page, such as a caption or a menu label, adds numbers you did not intend and makes the comparison harder.

Next, decide how to treat line breaks. A text block with three lines holds two line-break characters, and each one becomes a number in the output. If you want to encode each line separately, convert one line of text at a time. If you want to encode the whole block, leave the breaks in and expect the converter to print a 10 or a 13 wherever the text wraps.

Finally, keep a copy of the original text next to the numbers. Numbers alone do not say which encoding produced them, and the original text is the only proof that a later decode is correct. When you share the numbers, share the text and the encoding with them, so the reader can run the same conversion on the same text and compare results. This is how teams keep test cases for text handling: the text, the expected numbers and the encoding sit together in one place, and any change to the text shows up at once as a change in the numbers.

These habits matter most for long text. A paragraph of text has hundreds of numbers, and a single wrong one is hard to see unless you can line the text up against its list. Splitting the text into short lines, converting each line, and checking one line of text at a time turns a large job into small ones, and every small text check is easy to confirm by eye.

Free Online Tool for Instant Results

Because this browser-based utility runs in your browser, you get results instantly with no install and nothing to sign up for. It handles letters, digits, punctuation and symbols, from a single word such as hello to a long block copied from a document, or a short word like love. Use it as a quick reference, a study aid for uppercase and lowercase codes, or a debugging companion, then copy the decimal values wherever you need them. The page also helps you learn: seeing the input text and the output numbers side by side builds an intuition for how computers store text, and trying different text, from a short word to a full line of text, shows how each change in the text changes the numbers. Keep trying new text until the pattern between text and numbers feels familiar, and check each result against the text you typed.