Skip to the calculator
Rule Calculator

Convert text to hexadecimal

Hello in text is 48 65 6c 6c 6f in hexadecimal. Each digit is multiplied by its place value — the base raised to the digit's position, counting from zero on the right — and the products are added. The page prints every one of those products rather than only the total. The conversion is exact: bases are positional notation for the same number, so nothing is rounded and the result can be checked digit by digit.

Conversion rules checked · How we check

Hello in text

48 65 6c 6c 6f

How it gets there

Each character has a code point
"H" → U+0048 → 48 "e" → U+0065 → 65 "l" → U+006C → 6c "l" → U+006C → 6c "o" → U+006F → 6f
UTF-8, not ASCII
A character outside the ASCII range becomes two to four bytes, which is why the count of groups can exceed the count of characters.
Bytes
5 bytes from 5 characters

text to hexadecimal, at a glance

Two hex digits are one byte, which is why a hex dump is the standard way to look at text a program has mangled. The first 128 code points are ASCII; above that, UTF-8 spends two to four bytes on a character.

text to hexadecimal, at a glance
texthexadecimal
A41
Z5A
a61
z7A
030
939
space20
!21

Why is the working shown?

Every other converter of this kind prints the answer and stops. A base is a positional system, so the answer is a sum you can check: each digit is multiplied by the base raised to its position, and the results are added. Going the other way is repeated division, reading the remainders upwards. Neither is a black box, and this page refuses to be one.

Other conversions

Sources