StringMash.com

ASCII and character codes

Turn text into character codes in decimal, hex or octal, and read them back.

Conversion
2 characters
Updates as you type
Decimal by default

Using the code converter

Type text on the left to get its character codes on the right, or swap the boxes to turn a list of numbers back into text.

Base switches the output between decimal, hexadecimal and octal, and decoding expects whichever base you've picked. Separator sets what goes between the numbers. A token that isn't a valid number in the chosen base gets named in the error rather than skipped.

What the numbers mean

ASCII gave the first 128 characters a number each: control codes below 32, then punctuation, the digits, and the two alphabets. Those numbers never moved. Unicode adopted them wholesale, so 65 is still A on every machine you'll meet.

Past 127 you're in Unicode proper. This converter reports code points, so an accented e is 233 and an emoji runs into the hundreds of thousands. For the bytes underneath, use binary.

A–Z AND 0–9

Character codes

A65
B66
C67
D68
E69
F70
G71
H72
I73
J74
K75
L76
M77
N78
O79
P80
Q81
R82
S83
T84
U85
V86
W87
X88
Y89
Z90
048
149
250
351
452
553
654
755
856
957

The table is full of teleprinters

ASCII was standardised in 1963 for machines that printed on paper, and the layout still carries their fingerprints. A capital and its lower-case partner sit exactly 32 apart, which is one bit, so a keyboard could shift case with a single switch. The digits start at 48, and masking off the top four bits leaves the digit's actual value behind, which mattered when every instruction counted.

The control codes are the clearest fossils. Carriage return, 13, threw the print head back to the left margin. Line feed, 10, rolled the paper up a line. Two separate physical actions. Windows still ends a line with both, Unix with one, and a file moved between them can arrive with every line stacked in the same spot. Escape, 27, outlived the machine it was built for and is still on your keyboard.

Related conversions

Character codes, Unicode code points and binary are three views of one thing: the number behind a character, the table it comes from, and the bits it's stored as.

Base64 sits a level up, packaging those bytes for travel.

Questions

What's the difference between ASCII and Unicode?

ASCII is the first 128 code points. Unicode extends the same table to every script in use and leaves those original numbers alone.

Why does my emoji give one huge number?

It's a single code point, not a single byte. Emoji sit above 128,000 in the table.

What are the codes below 32?

Control codes from the teleprinter era: tab is 9, line feed 10, carriage return 13, escape 27. Most of the rest are unused now.

Which base should I use?

Decimal to read, hexadecimal to match documentation and colour codes, octal only for file permissions.