What is Hex?
Hexadecimal (Base16) encoding represents each byte of data as two hexadecimal digits (0–9 and a–f). It is a compact, human-readable way to view and transmit binary data — every byte from 00 to FF maps to a fixed two-character code. Hex is widely used to display hashes, colors, machine code and raw bytes. This tool converts text into its hexadecimal representation instantly in your browser.
Runs locally: hex encoding happens in your browser. It is a reversible representation, not encryption.
How Hex works
Hex encoding maps every byte to exactly two characters from 0–9 and a–f:
- The text is converted to bytes (UTF-8).
- Each byte (0–255) is split into two 4-bit halves.
- Each half (0–15) becomes one hex digit — for example
H= 72 =0x48,i= 105 =0x69, soHibecomes4869.
How to use
- Enter or paste your text in the input box.
- The Hex-encoded result appears instantly in the output.
- Click Copy to use the encoded value.
Examples
| Input | Hex |
|---|---|
A | 41 |
Hi | 4869 |
hello | 68656c6c6f |
© | c2a9 |
Options explained
- Case — Output hex in lowercase (a–f) or uppercase (A–F).
- Separator — Optionally insert spaces or another delimiter between byte pairs for readability.
- Character set — Text is read as UTF-8 bytes before being converted to hex.
Common uses
- Inspecting raw bytes, hashes and binary data in a readable form.
- Representing colors (for example #ff8800) and byte values.
- Embedding binary in text formats and debugging protocols.
- Converting between text and machine-level byte representations.
Frequently asked questions
What is hex encoding?
Representing bytes in Base16 — two hexadecimal digits per byte, using 0–9 and a–f.
Is hex encoding encryption?
No. It is a reversible representation with no security.
How do I decode hex?
Use the Hex Decode tool to convert it back to the original data.
Why is each byte two characters?
A byte holds 256 possible values, which is exactly two hex digits (16 × 16 = 256).