Loading tool…
Convert readable text into a hexadecimal byte string, or decode hex back into text. Useful for debugging encodings, protocols and binary data.
Loading tool…
Hex is a free, private online tool that lets you convert text to hexadecimal bytes or hex back to text. It runs entirely in your browser, so nothing you enter is uploaded to a server.
Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
Hexadecimal is base-16, using digits 0–9 and letters a–f. One byte (8 bits) is exactly two hex digits (00–ff), which makes hex a compact, readable way to show raw bytes.
Encoding converts each character to its UTF-8 byte(s) and prints them as two-digit hex. Decoding reverses the process. Spaces, 0x prefixes and newlines in the input are ignored when decoding.
Inspecting file signatures (magic numbers), debugging network packets, reading memory dumps, and working with color codes, hashes and binary protocols.
0x prefixes automatically, so many formats just work.Hexadecimal is a base-16 number system using the digits 0–9 and the letters a–f to represent values ten to fifteen. Its key property is that one byte (eight bits) is exactly two hex digits, from 00 to ff. That clean two-digits-per-byte mapping makes hex the standard, compact way to display raw binary data that would be unreadable as actual bytes.
To convert text to hex, the tool first encodes each character as its UTF-8 bytes, then prints each byte as a two-digit hexadecimal number. So 'A' (byte 65) becomes 41, and an emoji becomes four hex pairs. Decoding reverses this: pairs of hex digits are parsed back into bytes and the bytes are interpreted as UTF-8 text. Spaces, newlines and 0x prefixes in the input are ignored so many formats just work.
Hex is everywhere low-level work happens: file signatures (a PNG begins 89 50 4e 47), memory and hex-dump viewers, network packet inspection, color codes (#ff8800), cryptographic keys and hashes, character code points (U+1F600), and machine code. Whenever you need to see what bytes are really there, you read them in hex.
Because each byte is two hex digits, a valid hex string must have an even length. An odd count means an incomplete byte, so this tool flags it rather than guessing. It also tolerates common formatting — interspersed spaces, line breaks and 0x prefixes are stripped automatically before decoding.
Hex, binary and decimal are just different notations for the same numbers. Binary shows every bit (great for bit-level logic) but is long; decimal is human-natural but does not align with byte boundaries; hex is the practical compromise that maps neatly onto bytes. For converting between the bases of whole numbers, see the Number Base Converter; this tool focuses on turning text and byte data to and from hex.