💡 Tip: if your text is plain English, every setting on this page gives the same answer. The settings start to matter the moment a character above 127 appears — an accent, a rupee or euro sign, an emoji, anything in Hindi, Bengali, Arabic or Chinese. Choose UTF-8 byte when the numbers are going into a file, a URL or a network message.
🧭 User Guide
- Pick a direction. Text to numbers, or numbers back to text. There is no Convert button — the result updates while you type.
- Choose the base. Decimal is the default; hexadecimal, binary and octal are one menu away, so this doubles as a text-to-binary and text-to-hex converter.
- Decide what each number counts. Code point, UTF-8 byte or UTF-16 unit. For pure English they agree; above 127 they do not, and the page explains the difference below.
- Set the separator. Spaces, commas, one value per line, or none at all — the last of which pads every value to a fixed width so an unbroken run can still be read back.
- Check the counts. Characters, UTF-16 units, UTF-8 bytes, and how many characters sit above ASCII. That last figure is the one that predicts trouble.
- Take the result with Copy or Download, or press Send result to input to run it straight back the other way and prove it survives the trip.
🔢 One letter, three possible numbers
For anything above 127 these are three different answers, and picking the wrong one is the usual cause of mangled text.
Unicode code point
The number that identifies the character itself, independent of how it is stored.
The rupee sign is 8377, written U+20B9. This is the right choice when you are looking a character up, quoting it in documentation, or writing an HTML entity. It is the character’s identity, not its packaging.
UTF-8 byte
What is genuinely written to a file, a socket or a URL.
The same rupee sign becomes three bytes: 226 130 185. English letters stay one byte each and match ASCII exactly, which is why UTF-8 won. If your numbers are going anywhere near real storage or transmission, this is the setting you want.
UTF-16 code unit
How JavaScript, Java and Windows hold text in memory.
Characters beyond about 65,000 arrive as a pair — an emoji becomes 55357 56832 rather than a single value. Those halves are called surrogates, and seeing them is a reliable sign you are looking at UTF-16 rather than anything else.
So which should you choose?
Ask where the numbers are going.
Into prose or a lookup, use code points. Into a file, a database column, a QR payload or an API, use UTF-8 bytes. Debugging a string length that seems wrong in JavaScript, use UTF-16 units — that mismatch is what the surrogate pair is doing to your count.
📋 Every printable ASCII code, 32 to 126
The 95 characters a keyboard produces, with their decimal and hexadecimal values.
| Dec | Hex | Char | Dec | Hex | Char | Dec | Hex | Char |
|---|---|---|---|---|---|---|---|---|
| 32 | 20 | space | 64 | 40 | @ | 96 | 60 | ` |
| 33 | 21 | ! | 65 | 41 | A | 97 | 61 | a |
| 34 | 22 | " | 66 | 42 | B | 98 | 62 | b |
| 35 | 23 | # | 67 | 43 | C | 99 | 63 | c |
| 36 | 24 | $ | 68 | 44 | D | 100 | 64 | d |
| 37 | 25 | % | 69 | 45 | E | 101 | 65 | e |
| 38 | 26 | & | 70 | 46 | F | 102 | 66 | f |
| 39 | 27 | ‘ | 71 | 47 | G | 103 | 67 | g |
| 40 | 28 | ( | 72 | 48 | H | 104 | 68 | h |
| 41 | 29 | ) | 73 | 49 | I | 105 | 69 | i |
| 42 | 2A | * | 74 | 4A | J | 106 | 6A | j |
| 43 | 2B | + | 75 | 4B | K | 107 | 6B | k |
| 44 | 2C | , | 76 | 4C | L | 108 | 6C | l |
| 45 | 2D | – | 77 | 4D | M | 109 | 6D | m |
| 46 | 2E | . | 78 | 4E | N | 110 | 6E | n |
| 47 | 2F | / | 79 | 4F | O | 111 | 6F | o |
| 48 | 30 | 0 | 80 | 50 | P | 112 | 70 | p |
| 49 | 31 | 1 | 81 | 51 | Q | 113 | 71 | q |
| 50 | 32 | 2 | 82 | 52 | R | 114 | 72 | r |
| 51 | 33 | 3 | 83 | 53 | S | 115 | 73 | s |
| 52 | 34 | 4 | 84 | 54 | T | 116 | 74 | t |
| 53 | 35 | 5 | 85 | 55 | U | 117 | 75 | u |
| 54 | 36 | 6 | 86 | 56 | V | 118 | 76 | v |
| 55 | 37 | 7 | 87 | 57 | W | 119 | 77 | w |
| 56 | 38 | 8 | 88 | 58 | X | 120 | 78 | x |
| 57 | 39 | 9 | 89 | 59 | Y | 121 | 79 | y |
| 58 | 3A | : | 90 | 5A | Z | 122 | 7A | z |
| 59 | 3B | ; | 91 | 5B | [ | 123 | 7B | { |
| 60 | 3C | < | 92 | 5C | \ | 124 | 7C | | |
| 61 | 3D | = | 93 | 5D | ] | 125 | 7D | } |
| 62 | 3E | > | 94 | 5E | ^ | 126 | 7E | ~ |
| 63 | 3F | ? | 95 | 5F | _ |
Codes 0 to 31 and code 127 are not printable at all. They are the control codes the standard was designed around in 1963, when the receiving device was a teleprinter: 9 is tab, 10 is line feed, 13 is carriage return, 7 once rang a physical bell, and 127 was delete because on punched tape it meant every hole punched out. Only tab, line feed and carriage return still see daily use. This page shows those as words rather than blanks, so a stray one in pasted text is visible instead of invisible.
About the Text and ASCII Converter
This page turns writing into numbers and numbers back into writing, in decimal, hexadecimal, binary or octal, and it is honest about which numbering scheme it is using. That last part sounds like a footnote and is actually the whole difficulty.
Where ASCII genuinely ends
At 127. Not 255, and not wherever the tool stops complaining.
ASCII defines 128 values, numbered 0 to 127, and that is the entire standard. It has no accented letters, no currency symbol other than the dollar, no dash longer than a hyphen, and no non-Latin script whatsoever. Plenty of software will happily hand you the number 233 for an accented e and call it ASCII, but no ASCII-only system will accept it — and a fixed-width import, an older payment terminal or a protocol that strips the high bit will reject or corrupt it.
The counter on this page reports how many of your characters sit above 127 precisely because that number predicts whether the receiving system will complain. If it reads zero, your text is genuinely ASCII and will survive almost anything. If it does not, you are working in Unicode and should say so.
Why one character can carry three different numbers
Because identity and storage are separate questions.
Every character has one Unicode code point, permanently: the rupee sign is U+20B9, decimal 8377, and it will never be anything else. But that number has to be written down somehow, and the two common ways disagree. UTF-8 spells it as three bytes, 226 130 185. UTF-16 spells it as the single unit 8377, while spelling a smiling emoji as the pair 55357 56832. None of these is more correct than the others; they answer different questions.
What causes real damage is converting with one scheme and reading back with another. Numbers produced as UTF-8 bytes and interpreted as code points give you three unrelated characters instead of one — the familiar mess where a name arrives looking like several Latin letters glued together. This page keeps the setting visible and tells you when a sequence cannot be valid UTF-8, rather than producing something meaningless with an air of confidence.
Reading a value back exactly as it was written
Every combination on this page survives a round trip.
Convert in any base, with any unit, with any separator, then press Send result to input and convert back: you get your original text, character for character. That includes the option with no separator at all, which pads each value to a fixed width so an unbroken string of ones and zeros can still be divided correctly — sixteen binary digits for two ASCII letters, and the page refuses input whose length is not a multiple of that width instead of guessing where the boundaries fall.
What the tool refuses to do
Accept input it cannot read, and pretend that went well.
Type a decimal point where a whole number belongs and it says so, naming the value. Include a stray word among your codes and it names that too, rather than dropping it and returning a shorter message than you asked for. Ask for a byte above 255 or a code point above 1,114,111 and it explains which ceiling you have hit. A conversion tool that silently discards part of its input is worse than one that fails, because the output still looks plausible.
Jobs this page is built for
Mostly moments when text has to become something a machine will accept.
Developers check what a character actually is when a string comparison fails or a length is wrong. Students working through a computer-science exercise need the decimal or binary value of a letter. Anyone filling in a form that rejects “special characters” can find which character it means. People debugging a CSV that opens with question marks can see whether the file was UTF-8 all along. And it doubles as a text-to-binary converter, a text-to-hex converter and a binary-to-text decoder, because those are the same operation with the base changed.
Companion tools
Three that solve neighbouring problems.
To convert numbers between bases without any text involved, use the Digit Converter. To count what you have rather than encode it, the Word Counter reports characters, words and readability. To strip markup before encoding, run it through the HTML to Text Converter first.
Frequently Asked Questions
What is the ASCII value of the letter A?
65 in decimal, 41 in hexadecimal, 1000001 in binary.
Lower-case a is 65 + 32 = 97, and that gap of 32 holds for every letter, which is why changing case in ASCII is a single bit flip. Digit 0 is 48, and space is 32.
How do I turn a sentence into binary?
Choose Binary in the base menu; the text becomes ones and zeros as you type.
For the classic eight-bits-per-character look, set the separator to None or padding to Pad to full width. Paste that back with the same settings and it decodes cleanly.
Why did my accented character turn into two numbers?
Because you were converting to UTF-8 bytes, and that character needs two of them.
Switch What each number counts to Unicode code point for a single value per character. Neither reading is wrong — they answer different questions, and the right one depends on where the numbers are going.
Can I paste codes that have 0x or U+ in front of them?
Yes. Those prefixes are stripped automatically.
0x, 0b, 0o, U+, \u, \x, # and % are all recognised, so you can paste straight from source code or a debugger without cleaning it up first. Do check the base menu matches what you pasted.
Are the codes from 128 to 255 part of ASCII?
No, although a great deal of software talks as if they were.
That upper range belongs to whichever single-byte code page a system happens to be using — Latin-1, Windows-1252, one of the ISO-8859 family — and they disagree with each other. The same byte can be a different character on two machines, which is exactly the ambiguity Unicode was invented to end.
What separates UTF-8 from ASCII?
UTF-8 covers every character in Unicode; ASCII covers 128.
They are deliberately compatible where they overlap: any file containing only ASCII is already valid UTF-8, byte for byte identical. UTF-8 then uses two, three or four bytes for everything else, which is how one encoding manages to hold every writing system without breaking half a century of older files.
Does anything I paste get uploaded?
No. Every conversion happens in your browser.
Nothing is sent to a server, nothing is stored, and the page keeps working with the connection off once it has loaded. It is free, with no sign-up and no limit on how much text you convert.