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

Printable chart

Using the code converter

Type text to get its character codes, or swap the boxes and paste a list of numbers to read them back as 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. With None, every number is padded to two hex digits or three decimal or octal ones, so the run can be cut apart again. 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 most emoji are six-digit numbers, like 128,512 for the grinning face. 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

Built for teleprinters

ASCII was first published in 1963 for machines that printed on paper. Lowercase arrived in the 1967 revision, each letter exactly 32 after its capital. That's one bit, and the committee put it there because it made keyboards and printers simpler to build. The digits start at 48, and masking off the top four bits leaves the digit's actual value behind.

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

Unicode code points carry these same numbers on past 127, and binary shows the bits each one is 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. Most emoji sit between 127,744 and 129,791 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.

Sources

Added . Last updated and reviewed . What's new