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
48 65 6c 6c 6f
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
- Binary Translator: Text to BinaryConvert text to binary code and binary back to text. Uses 8-bit bytes with UTF-8, so it handles ASCII and every other character.
- Text to ASCII and Unicode ConverterConvert text to ASCII codes and Unicode code points in decimal and hex, or turn a list of character codes back into text.
- Base64 Encoder and DecoderEncode text to Base64 or decode Base64 back to text, with full UTF-8 support and a URL-safe variant.
- Hex CalculatorAdd, subtract, multiply and divide hexadecimal, binary, octal or decimal numbers, and apply bitwise AND, OR and XOR. Results in all four bases.
- Morse Code TranslatorTranslate text to Morse code and Morse code back to text. Supports letters, numbers and punctuation in International Morse Code.
- Caesar Cipher Encoder and SolverEncrypt or decrypt text with a Caesar shift cipher. Shows all 25 possible shifts so you can solve a cipher without knowing the key, including ROT13.
- Letter to Number Converter (A1Z26)Convert letters to their alphabet position numbers, where A is 1 and Z is 26, or convert numbers back to letters.
- Chmod CalculatorBuild Unix file permissions by ticking read, write and execute for owner, group and others. Get the octal number, symbolic notation and chmod command.
- IEEE 754 Floating Point ConverterConvert a decimal number to its IEEE 754 single and double precision representation: sign, exponent and mantissa bits, hex value and the exact stored number.
- Subnet CalculatorCalculate the network address, broadcast address, host range, subnet mask and number of hosts for any IPv4 address and CIDR prefix.
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.