Text to hex converter

Type any text and get its hexadecimal bytes, two digits per character, ready to copy. Useful for debugging, code and hex editors. UTF-8, so accents and emoji work.

  • Free
  • No sign-up
  • Runs in your browser
text-to-hex

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

How it works

Paste or type

Enter it in the box; the direction is already set.

Read the result

The result appears as you type.

Copy it

Use the copy button, or switch the direction to convert back.

How to convert text to hex

To convert text to hex, type or paste it in the converter above. Each character is turned into one or more bytes and each byte is written as two hexadecimal digits: for example, the word Hex becomes 48 65 78. Copy the result, or switch the direction to decode hex back to text.

Text as hexadecimal bytes

A text file is a sequence of bytes, and hexadecimal is the neat way to write them: two digits per byte, from 00 to FF. The ASCII letter H is byte 48, and a whole word is just those pairs one after another.

The word Hex in hex

Characters
CharacterDecimal (ASCII/UTF-8)Hex
H7248
e10165
x12078

Where hex-encoded text is used

  • Programming: writing strings as byte escapes in code, for example \x48\x65\x78 for Hex in C or Python.
  • Databases: hex literals such as x'..' and functions like HEX() to store or compare raw text.
  • Debugging: comparing what a program sends with what it should send, byte by byte.
  • Hex editors and network tools, which show data in hexadecimal.

Upper or lower case

Hex digits above 9 can be written with capitals (4A) or small letters (4a); both mean the same. Choose whatever the destination expects, since some tools and style guides prefer one form.

Multi-byte characters

Only basic ASCII characters give one pair per character. In UTF-8 the letter ü is the two bytes C3 BC, and most emoji use four bytes, so the hex for a sentence with symbols is longer than twice its character count.

Private by design

The conversion runs in your browser, so what you type is never sent to a server.

Frequently asked questions

How do I convert text to hex?
Type it in the converter. Every character is written as its byte values in hexadecimal.
How many hex digits is one character?
Two for basic ASCII. Accented letters, other alphabets and emoji use four to eight digits in UTF-8.
Should I use uppercase or lowercase hex?
Both are valid and mean the same. Match the style of the system that will read it.
Can I convert hex back to text?
Yes. Switch the direction, or use the hex to text converter.
Is it free and private?
Yes. It runs in your browser and nothing you type is sent to a server.
Is this converter free?
Yes. There is no sign-up and no limit, and it runs in your browser, so nothing you type is sent to a server.
Does it work on a phone?
Yes. It works in any modern mobile browser, and the result updates as you type.