Convert text to hexadecimal byte values, or paste hex to read it back as text. Free hex converter running entirely in your browser.
Text on the left encodes to hex bytes; hex values on the right decode back to text.
Every keystroke recalculates the other box instantly — no button, no delay.
Copy the result with one click, or hit swap to flip the direction of the conversion.
Hexadecimal (hex) is a base-16 number system that uses sixteen distinct symbols: the digits 0 through 9 and the letters A through F. Each hex digit represents exactly four bits of binary data, which makes hex a compact and convenient way to express binary values. Two hex characters encode one byte (8 bits), so a 32-byte value like a SHA-256 hash becomes a 64-character hex string rather than a 256-character binary string.
The hex system is fundamental to computing because it maps cleanly onto the binary representation that processors actually use. A single hex digit corresponds to a 4-bit nibble, and a pair of hex digits corresponds to a full byte. This one-to-one mapping between hex and binary makes it straightforward to read memory addresses, color codes, machine instructions, and cryptographic outputs without dealing with long strings of ones and zeros.
In most programming contexts, hexadecimal values are prefixed with 0x to distinguish them from decimal numbers. For example, 0xFF represents the decimal value 255, and 0x00 represents zero. The letters A through F can be uppercase or lowercase: 0xff and 0xFF are equivalent.
Converting text to hexadecimal is a straightforward process. Each character in a text string has a numeric code defined by the ASCII or UTF-8 standard. The hex translator looks up each character's code and writes it as a two-digit hexadecimal number. For example, the letter A has ASCII code 65 in decimal, which is 41 in hex. The word Hello becomes 48 65 6c 6c 6f.
Converting hex back to text reverses the process: split the hex string into pairs, convert each pair to its decimal byte value, and interpret those bytes as UTF-8 (or ASCII) characters. For example, 48 65 6c 6c 6f decodes to "Hello" because 0x48 = 72 (H), 0x65 = 101 (e), 0x6c = 108 (l), 0x6c = 108 (l), and 0x6f = 111 (o).
Not all hex sequences produce valid text: bytes above 0x7F may require multi-byte UTF-8 sequences. This hex converter handles standard ASCII and common UTF-8 characters automatically.
| Hex | Decimal | Binary | ASCII |
|---|---|---|---|
| 00 | 0 | 00000000 | NUL |
| 0A | 10 | 00001010 | LF (newline) |
| 20 | 32 | 00100000 | Space |
| 30 | 48 | 00110000 | 0 |
| 41 | 65 | 01000001 | A |
| 61 | 97 | 01100001 | a |
| 7F | 127 | 01111111 | DEL |
| FF | 255 | 11111111 | N/A (extended) |
| Property | Binary (Base-2) | Octal (Base-8) | Decimal (Base-10) | Hex (Base-16) |
|---|---|---|---|---|
| Digits used | 0, 1 | 0-7 | 0-9 | 0-9, A-F |
| Bits per digit | 1 | 3 | ~3.32 | 4 |
| One byte requires | 8 digits | 3 digits | 1-3 digits | 2 digits |
| Common prefix | 0b | 0o | None | 0x |
| 255 expressed as | 11111111 | 377 | 255 | FF |
| Primary use | Logic gates, bit flags | Unix permissions | Human-readable math | Memory, crypto, colors |
Binary is the native language of computers but impractical for humans to read at scale. Octal was historically used in early computing systems and survives mainly in Unix file permissions. Decimal is intuitive for everyday arithmetic but does not align cleanly with byte boundaries. Hexadecimal offers the best balance: it maps perfectly to binary (each hex digit equals exactly 4 bits), produces compact representations, and is universally used in networking, systems programming, and cryptography.