Encode String to Hex (Base16)
Encode text or binary data as Hex (Base16) online using UTF-8, UTF-16, Base64, and other input encodings. Read more
What is Hex encoding?
Hexadecimal encoding, also called Base16, represents every byte using two characters from 0–9 and A–F. For example, the byte value 255 is FF. Hex is convenient for inspecting binary data because byte boundaries remain visible, but the output is twice the size of the original bytes.
Base16 is described in RFC 4648. Uppercase and lowercase hexadecimal digits represent the same values.
How to encode data as Hex
Enter the source value, select how the input should be interpreted, and select Encode. Use UTF-8 for ordinary text. Choose Base64 or another binary encoding only when the input already represents encoded bytes.
For example, UTF-8 text Hello produces:
48656C6C6F
Selecting lowercase output changes the letters to 48656c6c6f without changing the represented bytes.
Text encoding changes Hex output
Hex represents bytes, not abstract characters. A non-ASCII character may use multiple bytes in UTF-8 and a different byte sequence in UTF-16. If another tool returns a different Hex value, first confirm that both tools use the same character encoding and line endings.
Hex encoding FAQ
Is Hex encryption?
No. Hex is directly reversible and provides no secrecy, authentication, or compression.
Does Hex require padding?
Base16 does not need an = padding character. Each complete byte is always represented by exactly two hexadecimal digits.
How do I convert Hex back to text?
Use the Hex Decode tool and select the output encoding that matches the original bytes.