ASCII Converter — Text to ASCII Codes & Back

Convert text to its ASCII / Unicode code-point numbers, or turn a list of codes back into text.

🔡

ASCII ↔ Text Converter

Text • char codes

0 chars
0 chars

How to Use the ASCII ↔ Text Converter

  1. Pick a direction — use the toggle at the top (e.g. encode vs decode).
  2. Type or paste your text — the result updates live as you type; large inputs are fine.
  3. Copy the result — one click copies the output to your clipboard.
  4. Swap — flip the direction (⇄) to reverse the conversion instantly.

Why Use This ASCII ↔ Text Converter

🎯

Reversible in one click

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.

Live as you type

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.

🔒

100% private

Everything runs in your browser — no account, no uploads, nothing leaves your device.

Understanding the ASCII ↔ Text Converter

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.

Formula & Logic

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–126

where:

32
the case offset, and also the code for space
48
the offset for digit characters
extended ASCII
codes 128–255, which vary by codepage and are not standard ASCII

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.

SourceUnicode Character Code Charts

Step-by-Step Example: Encoding "Hi5" and Converting Case

Look up three characters, then perform case conversion arithmetically.

  • TextHi5
  1. H is uppercase: code 72.
  2. i is lowercase: code 105.
  3. 5 is a digit character: code 53. Its numeric value is 53 − 48 = 5.
  4. Convert H to lowercase: 72 + 32 = 104, which is "h".
  5. Convert i to uppercase: 105 − 32 = 73, which is "I".
  6. In binary, 72 is 01001000 and 104 is 01101000 — one bit differs.

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 ↔ Text Converter FAQ

For standard English characters the ASCII number and Unicode code point match (A = 65). This tool outputs the code point of each character so it also works for symbols and emoji.

Related Converters

✔ Written & reviewed by Dr Sam — 20+ yrs in management & research leadership📅 Last updated September 2026📚 Sources: The Unicode Standard & Unicode Character Database📑 How we build & check these

What the Numbers Behind the Letters Are Doing

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.