Digital ToolPad.

Runs 100% in your browser

Your data never leaves your device. zero uploads.

Text to Hex Converter

Type text and get its bytes in hexadecimal. Choose separators, a 0x prefix and upper or lower case.

  • Hex ↔ text
  • UTF-8 aware
  • 0x, \x, %, spaces
  • Byte breakdown

What is text to hex conversion?

Text to hex conversion encodes each character as UTF-8 bytes and writes each byte as two hexadecimal digits. English letters and digits take one byte with the same values as ASCII, so “A” is 41 and “a” is 61. Other characters take 2–4 bytes. Hex is a compact, readable way to show exact bytes in code, logs, URLs and protocols.

How to convert text to hex

  1. Type or paste text in the Text box.
  2. Choose the separator, whether to add a 0x prefix, and upper or lower case.
  3. Check the character breakdown for multi-byte characters.
  4. Copy the hex for your code, test data or documentation.

How text becomes binary and hex

  • Every character is first encoded as UTF-8 bytes. Plain English letters, digits and punctuation use one byte each (the same values as ASCII).
  • Accented letters use 2 bytes, most other scripts 2–3, and emoji 4. That is why “é” is 11000011 10101001 in binary.
  • Binary shows each byte as 8 bits (0s and 1s). Hex shows each byte as 2 digits from 00 to FF.
  • The character breakdown under the converter lists the code point, decimal, hex and binary for each character.

Why use this text to hex converter

  • Works in both directionsType in either box. The translator decodes as easily as it encodes.
  • Accepts any hex formatReads 48 65 6C, 48656C, 0x48 0x65, \x48\x65 and %48%65 without cleanup.
  • UTF-8, not just ASCIIMulti-byte characters and emoji decode correctly, with a warning for invalid bytes.
  • Private by designEverything is calculated in your browser. Nothing you type is sent to a server or saved.

Common uses

  • Debugging and logs. Read hex dumps, packet payloads and escaped strings.
  • CTF and puzzles. Decode hex-encoded flags and messages.
  • Web development. Inspect percent-encoded and \x-escaped strings.
  • Embedded and serial data. Turn bytes from a device into readable text.

Related converters: binary translator, binary to text, text to binary, hex to ASCII, Base64 encoder, URL encoder. Browse all encoding tools.

Example: ASCII to hex

Hello → 48 65 6C 6C 6F Hello with 0x prefix → 0x48 0x65 0x6C 0x6C 0x6F café → 63 61 66 C3 A9

What to expect from the result

Output is the UTF-8 encoding. For UTF-16 or a legacy code page such as Windows-1252, byte values for non-ASCII characters differ.

Text to Hex Converter questions

How do I convert ASCII to hex?

Type the text. Each character’s byte value is shown as two hex digits: A = 41, B = 42, space = 20.

Why does é become two hex bytes?

In UTF-8, characters outside basic ASCII use more than one byte. é is C3 A9.

Can I add 0x before each byte?

Yes. Tick 0x prefix to get 0x48 0x65… which is handy for C, JavaScript and Python byte arrays.

Should hex be uppercase or lowercase?

Both mean the same value. Use whichever your code or documentation expects; untick Uppercase for lowercase.

How do I convert the hex back to text?

Paste it into the Hex box. It is decoded instantly, or use the hex to ASCII converter.

100% private — your data never leaves your browser

No registration, no tracking of your content, no server uploads. Don't just take our word for it:

  • No server, no uploads

    Your files and text are processed entirely on your device. Nothing is ever sent to us.

  • Works offline

    Once loaded, this tool keeps working with your Wi-Fi turned off. Try it.

  • Verify it yourself

    Open your browser's DevTools → Network tab. You'll see zero requests carrying your data.

Explore more tools

More utilities for your next task.

Browse all tools