ASCII text to decimal converter

Write text as the decimal values of its bytes, for code, puzzles and debugging.

The data entered in the form are processed only in your browser and will not be saved or sent anywhere.

Number systems

The same number can be written in different bases. Decimal (base 10) uses the digits 0-9, binary (base 2) only 0 and 1, octal (base 8) the digits 0-7, and hexadecimal (base 16) the digits 0-9 plus the letters A-F. For example, 255 in decimal is 11111111 in binary, 377 in octal and FF in hex.

Paste as many numbers as you like, separated by spaces, commas, semicolons or new lines - each one is converted where it stands, so the layout of your list stays the same. The usual prefixes are understood (0b for binary, 0o for octal, 0x or # for hex), as is a minus sign. There is no size limit: numbers longer than a computer word are converted exactly.

Text and bytes

Computers store text as bytes. In ASCII every letter, digit and punctuation mark is one byte: "H" is 72 in decimal, 48 in hex and 01001000 in binary. Letters outside ASCII, like Polish "ą", are written as two or more bytes in UTF-8 - the encoding used by the web - and these tools use it, so any text converts back and forth without loss.

When converting bytes back to text, separate the bytes with spaces (48 69) or paste them as one run (4869) - a run is cut into whole bytes. Switch on "Separately for each line" to convert every line on its own and, with "Results as CSV", get each input next to its result.