Skip to content

Hex Translator: Text to Hexadecimal

Enter text to get its bytes in hexadecimal, or paste hex to decode it. Spaces between bytes are optional when decoding.

Result

Hexadecimal
48 65 6c 6c 6f
Without spaces
48656c6c6f
Bytes
5

Formula

  • One byte = two hexadecimal digits, from 00 to FF
  • Hex digits: 0 to 9, then A = 10, B = 11, C = 12, D = 13, E = 14, F = 15
  • H = 72 = 4 × 16 + 8 = 0x48

How the Hex Translator works

Hexadecimal is base 16. Because 16 is 2 to the fourth power, each hex digit stands for exactly four bits and two digits describe one byte. That makes hex a compact way to write binary data.

To convert a character, take its code number and write it in base 16. The letter H is 72, which is 4 sixteens and 8 ones, so it is 48 in hex.

Worked example

"Hello" becomes 48 65 6c 6c 6f. H is 0x48, e is 0x65, l is 0x6c and o is 0x6f.

Frequently asked questions

What is 48 65 6C 6C 6F in text?

It spells Hello. Each pair of hex digits is one ASCII character.

Is hex the same as ASCII?

No. ASCII assigns numbers to characters. Hex is one way of writing those numbers. The letter A is 65 in decimal and 41 in hex.

Related calculators

All text, code and network calculators · All calculators

Related unit converters

Calculations run in your browser and nothing you enter is sent to a server. Results are provided for general information. Check critical figures independently before relying on them.

☕ Like this tool?

Buy me a coffee to support development

☕ Support UnitGenie

If this tool has been helpful, consider buying me a coffee to support development and keep it free for everyone!