Hex Converter
Convert text to hex and back, hex to decimal and back, or a CSS hex color to RGB and HSL values, right in your browser.
Input
Output
How to use the hex converter
Pick a mode, then paste text, hex, a decimal number or a CSS hex color. The output updates as you type. Text is converted to lowercase hex with a space between bytes so it is easy to read. Hex input is forgiving: spaces, 0x prefixes and # marks are stripped before decoding.
Why hex matters
Hexadecimal is the standard compact way to write binary data. Memory addresses, color codes, network captures, hash digests and file inspection all use it. Converting between hex, decimal and text is one of the most common low-level debugging tasks.
Common uses
- Inspecting bytes in network captures or hex dumps
- Turning a CSS hex color into RGB or HSL values
- Decoding hex-encoded API responses
- Working out memory offsets and addresses
- Reading hash outputs and other cryptographic values
Hex vs Base64 vs binary
Hex uses 2 characters per byte, which doubles the size of the data but stays easy to read. Base64 is denser: every 3 bytes become 4 characters, about 33% overhead. Binary, at 8 characters per byte, is the most literal and the hardest to read. Use hex for short identifiers and debugging, Base64 for long payloads, and binary for teaching or very low-level work.
Frequently asked questions
Why do I sometimes see a "0x" prefix?
"0x" is the usual prefix for hex numbers in C-style languages, and the decimal to hex mode uses it. CSS colors use "#" instead. Both mean that what follows is in base 16.
What is the difference between hex and Base16?
There is none. Hexadecimal and Base16 both mean base-16 encoding. RFC 4648 calls the byte encoding "Base16".
Can it handle very large numbers?
Yes. The decimal and hex modes use arbitrary precision, so numbers far beyond 64 bits convert exactly.
Why is the text-to-hex output lowercase?
Lowercase is the common convention for byte dumps and hashes. Both cases mean the same value, and the hex to text mode accepts either.

