Text · Converter

Text to hex converter.

Type or paste text and get its hexadecimal bytes. Hello becomes 48 65 6C 6C 6F. Pick the separator and prefix to match what your code or tool expects.

Runs in your browserNothing is uploaded

Advertisement

Input

Result

Enter a value to convert it.

How to text to hex by hand

Each character has a code number; the hex form of that number is two digits for a byte. H is 72, and 72 in hex is 48 (4×16 + 8). Repeat for every character and join the pairs.

Text is encoded as UTF-8 first, so plain ASCII letters give one byte each and characters like é or € give two or three bytes (C3 A9, E2 82 AC). The prefix option writes 0x48 or \x48 style bytes for pasting into code.

Worked examples

Text to hex converter examples
TextHex
Hi48 69
Hello48 65 6C 6C 6F
A41
Space (" ")20
éC3 A9
€E2 82 AC

Need several formats side by side? Use the binary converter, which shows text, binary, hex and decimal together, or look a character up in the ASCII table. For Base64 text, see the Base64 encoder and decoder.

Sources: RFC 4648 section 8, Base 16 encoding; RFC 3629, UTF-8, a transformation format of ISO 10646; RFC 20, ASCII format for network interchange. Retrieved October 2026.

Text to hex FAQ

How do I convert text to hex?

Look up each character code, then write that number in base 16. H is 72, which is 48 in hex. This page does it for every character at once.

What is "Hello" in hex?

Hello is 48 65 6C 6C 6F: H is 48, e is 65, l is 6C, l is 6C and o is 6F.

Why is the space 20 in hex?

The space character has code 32, and 32 in base 16 is 20 (2×16 + 0).

Why do some characters give more than one hex pair?

Text is encoded as UTF-8. Characters outside basic ASCII use two to four bytes, so é is C3 A9 and the euro sign is E2 82 AC.

Upper or lower case hex?

They mean the same value: RFC 4648 describes hex (base 16) as a case-insensitive encoding, and its alphabet is written in upper case (4F). Choose either with the case option.

Advertisement
Advertisement