Toolman 100% local

ASCII 57

ASCII 57 is Digit 9, written 9.

Every representation

Character9
NameDigit 9
Decimal57
Hexadecimal0x39
Octal0071
Binary00111001
HTML entity9
Escape sequence\x39
UnicodeU+0039
GroupDigit

ASCII 57 on the wire and in a URL

The same character has different spellings depending on what is carrying it, and three of them come up often enough to be worth having in one place.

In a URL this character is unreserved and can appear as itself. Percent-encoding it to %39 is still legal and means the same thing, which is why two URLs that look different can be the same URL.

The UTF-8 row is the reason ASCII text needs no conversion: every ASCII byte is already valid UTF-8 and encodes to itself. That is not true in the other direction — a UTF-8 byte above 127 is part of a multi-byte sequence and means nothing on its own — and it is why a file that opens correctly until the first accented character was read as ASCII when it was not.

What it is for

The digit 9. The digits occupy 48 to 57, so subtracting 48 from a digit's code gives its numeric value — the oldest trick in character handling.

Where the number comes from

The digits were placed at 48 to 57 so that 0 through 9 are contiguous and the low four bits of each code are the digit's own value: 57 in binary is 00111001, and the last four bits are 1001, which is 9.

Frequently asked questions

What is ASCII 57?

Digit 9, the character 9. In hexadecimal it is 0x39, in octal 0071, and in binary 00111001.

How do I type ASCII 57?

Type 9 directly. In a string literal it can also be written \x39, and in HTML as 9.

Is ASCII 57 printable?

Yes. Codes 32 to 126 are the printable range, which is every character ASCII can actually display.

Nearby codes

Full ASCII table · Text to binary converter · Number base converter

UTF-80x39 — one byte, the same as the ASCII code
UTF-160x0039 — two bytes, high byte zero