Convert text to its ASCII / Unicode code-point numbers, or turn a list of codes back into text.
Text • char codes
Encoding and decoding share the page, so any result can be pasted straight back to confirm it round-trips to the text you started with — the quickest check that nothing was mangled.
Results are recalculated on every keystroke, with no submit step and no page reload, so a value can be adjusted until the answer looks right rather than guessed once.
Everything runs in your browser — no account, no uploads, nothing leaves your device.
ASCII assigns a number to every basic English character — A is 65, a is 97, a space is 32. This converter turns text into its character-code numbers and turns a list of codes back into text, using full Unicode code points so it also handles symbols and emoji.
It is handy for programming exercises, encoding puzzles, debugging data, and understanding how text maps to numbers. Instant, browser-based, with nothing uploaded.
ASCII assigns a number from 0 to 127 to each character, using seven bits, and its ordering was designed rather than arbitrary. Digits occupy 48–57, uppercase letters 65–90 and lowercase 97–122, so the gap between a letter's upper and lower case is exactly 32 — a single bit. That is why case conversion is a bitwise operation rather than a lookup, and why sorting ASCII strings puts all uppercase before all lowercase. Codes below 32 are control characters, survivals from teleprinter days, of which carriage return and line feed still cause cross-platform trouble.
Uppercase to lowercase: code + 32 (or set bit 5)Digit character to value: code − 48A=65 · Z=90 · a=97 · z=122 · 0=48 · space=32Control characters: 0–31; printable: 32–126where:
Assumptions: True ASCII is 7-bit and covers only English. Anything beyond it — accented letters, other scripts, emoji — requires Unicode. UTF-8 is designed so that its first 128 codepoints are byte-identical to ASCII.
Look up three characters, then perform case conversion arithmetically.
ResultH=72, i=105, 5=53 — case differs by exactly 32
The single-bit case difference is why `c | 32` lowercases and `c & ~32` uppercases an ASCII letter. It also explains why "Zebra" sorts before "apple" in a naive byte comparison: 90 is less than 97, so all capitals precede all lowercase.
ASCII is a 7-bit code, which caps it at 128 slots. Only 95 of those are printable; the first 32 and the last one are control codes left over from teleprinters, which is why a stray byte 7 still makes some terminals beep and why carriage return and line feed are two separate characters rather than one. Everything above 127 that a modern converter displays — accented letters, symbols, emoji — is Unicode extending the original table rather than ASCII itself.
The layout of the table is deliberate, and two patterns in it are still exploited by working code. The digits occupy 48 to 57, so subtracting 48 from a digit's code yields the digit's value, which is why parsing routines are written as a subtraction. Upper and lower case are separated by exactly 32 — a single bit — so flipping that one bit converts A to a and back, which is how case conversion was implemented long before locale-aware libraries existed.
That tidiness is also the source of the classic bug. Because the alphabet is contiguous and case-separated by a bit, sorting by code point puts every capital letter before every lower-case one, so a naive sort places Zebra ahead of apple. Anything user-facing needs a collation that understands language rather than a comparison of these numbers, and the codes on this page are best treated as a transport format rather than as an ordering.