Advertisement

ASCII converter

Convert seven-bit ASCII text, hexadecimal bytes, binary bytes or decimal character codes, with decimal, hex and binary results side by side.

Calculator

ASCII text
Hello
Decimal codes
72 101 108 108 111
Hexadecimal bytes
48 65 6C 6C 6F
Binary bytes
01001000 01100101 01101100 01101100 01101111
Character codes
CharacterDecimalHexBinary
H72.0000004801001000
e101.0000006501100101
l108.0000006C01101100
l108.0000006C01101100
o111.0000006F01101111

Advertisement

How this calculator works

ASCII assigns values from 0 to 127 to control characters, spaces, digits, letters and punctuation. Read text as character codes or parse the chosen numeric base, then express the same codes in the other bases. Eight-bit binary output has a leading zero because ASCII uses only seven significant bits. Control characters may not be visibly printable.

Formula

Character code = decimal integer 0 to 127. Hexadecimal writes each byte as two base-16 digits; binary writes it as eight base-2 digits.

Worked example

A has decimal code 65, hexadecimal 41 and binary 01000001. The word Hi is decimal 72 105, hex 48 69 and binary 01001000 01101001.

Advertisement

Frequently asked questions

Why is an accented letter rejected?

ASCII does not include accented letters. Use UTF-8 through the binary or hex text converter.

Can I enter control codes?

Yes. Decimal values 0 to 31 and 127 are accepted and labelled as controls in the table.

Are separators part of the encoded text?

The output separator only separates numeric codes. A literal space in text is itself ASCII code 32.

Sources

Advertisement