HomeHex Translator
Bidirectional · Tool matrix

Hex Translator

Convert text to hexadecimal byte values, or paste hex to read it back as text. Free hex converter running entirely in your browser.

How to use it

Two boxes, one engine.

01

Pick a direction

Text on the left encodes to hex bytes; hex values on the right decode back to text.

02

Updates as you type

Every keystroke recalculates the other box instantly — no button, no delay.

03

Copy and go

Copy the result with one click, or hit swap to flip the direction of the conversion.

What Is Hexadecimal?

Understanding the base-16 number system.

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.

How Hex Conversion Works

From text to hex and back again.

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 Conversion Reference

Quick lookup across number systems.

HexDecimalBinaryASCII
00000000000NUL
0A1000001010LF (newline)
203200100000Space
3048001100000
416501000001A
619701100001a
7F12701111111DEL
FF25511111111N/A (extended)
Hex vs Other Number Systems

Binary, octal, decimal, and hex compared.

PropertyBinary (Base-2)Octal (Base-8)Decimal (Base-10)Hex (Base-16)
Digits used0, 10-70-90-9, A-F
Bits per digit13~3.324
One byte requires8 digits3 digits1-3 digits2 digits
Common prefix0b0oNone0x
255 expressed as11111111377255FF
Primary useLogic gates, bit flagsUnix permissionsHuman-readable mathMemory, 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.

Where this comes up

Common uses for a hex translator.

FAQ

Hex translator, explained.

What's the difference between this and Binary to Hex?
This page converts text to and from hex byte values (one character per byte pair). Binary to Hex converts raw binary numbers instead — use that one if you already have a string of 0s and 1s.
Is a hex color code the same kind of hex?
Yes, conceptually — a color like #39FF8D is three hex byte pairs (red, green, blue), the same base-16 system used here. This tool just maps text characters instead of color channels.
Can I look up one character's hex value without typing a whole sentence?
The ASCII Table lists the hex value for every printable character at a glance.
Why is the hex output exactly double the length of plain ASCII text?
Each byte (one ASCII character) is written as exactly 2 hex digits, so plain ASCII text always produces hex output twice as long, before counting the spaces between bytes.
How do I convert hex to decimal?
Multiply each hex digit by its positional power of 16 and sum the results. For example, 0x1A3 = (1 × 256) + (10 × 16) + (3 × 1) = 419 in decimal. Each position from right to left represents 16⁰, 16¹, 16², and so on.
What does the 0x prefix mean?
The 0x prefix indicates that the following characters should be interpreted as hexadecimal rather than decimal. Without it, the string '10' is ambiguous: it could mean ten (decimal) or sixteen (hex). The prefix originated in C programming and is now standard across most programming languages and developer tools.
Can hex values contain spaces?
In raw hex encoding, spaces are not part of the data. However, spaces are often added between byte pairs for readability. For example, '48 65 6c 6c 6f' and '48656c6c6f' represent the same data. Most hex conversion tools strip spaces before processing.