Text to Hex

Encode text as hexadecimal UTF8 bytes. Inspect byte values for debugging, learning, or comparison with encoded text data.

Processed locally in your browser. Maximum input: 1 MB.

Developer Tools

Encode text as hexadecimal UTF8 bytes. Inspect byte values for debugging, learning, or comparison with encoded text data.

How to use

Enter the source text and copy the byte pairs. Keep the order intact when passing the output to a decoder.

Example

Hi becomes 48 69. The letter é becomes c3 a9 because its UTF8 encoding contains two bytes.

FAQ

Is hex output encryption?

No. Hex is a readable representation of bytes. Anyone can decode it when they know the character encoding.

Related tools

A practical task

Record which character encoding the hex represents when sharing it with another person. This output is UTF8 bytes. For OK it is 4f 4b; for text outside basic Latin, a visible letter can require several byte pairs.

Another useful question

Does letter case in the hex output matter?

Uppercase and lowercase A through F describe the same values. Case in the original text does matter because it changes the encoded characters.

Details for interpreting the result

Detail Explanation
Hexadecimal notation Hexadecimal uses digits 0 through 9 and letters A through F. Letter case does not change the byte value. Text stored as hex still needs a character encoding before its bytes can be read as words.
A complete byte A byte holds a value from 0 through 255. Binary writes that value with eight digits; hexadecimal writes it with two. Leading zeros are part of that fixed width representation and must stay in place.
UTF8 bytes UTF8 encodes characters as bytes. Basic Latin letters use one byte each, while many accented letters and other scripts use more. A byte count therefore differs from a visible character count.
Code points A Unicode code point identifies a character or a component of one. A letter followed by a combining accent contains two code points even when the screen displays one accented letter.
Encoding and encryption Encoding changes how data is represented so another system can read it. It does not require a secret key. Encryption protects information with a key, while hashing produces a digest for a different purpose.
Similar looking text Two strings can look identical but use different Unicode sequences. An accented letter can be stored directly or as a letter plus an accent. Visual similarity alone does not establish byte equality.
Line endings A line break can use LF or CRLF. They look similar in an editor but contain different characters. Byte comparisons and checksums depend on the exact representation, including a final line break.
Binary notation Binary uses only 0 and 1. Keep byte boundaries intact when inspecting encoded text. A missing digit shifts the following bits, so a string of plausible looking zeros and ones can still fail decoding.