Convert HEX to RGB Online — Free
Runs 100% in your browser — your files never leave your device.
CSS variables, canvas code, and design tools all want RGB in different contexts, while the web still hands you HEX. Paste a HEX value and read the same color as rgb() — and hsl() — normalized and ready to copy. The conversion runs entirely in your browser.
How it works
- 1
Paste a HEX color
Enter a 3- or 6-digit HEX value like #336699.
- 2
Read the RGB value
The same color appears as rgb() and hsl() at once.
- 3
Copy what you need
One click copies any format to your clipboard.
About this tool
How the conversion works
HEX notation is a compact form of RGB: each pair of hex digits encodes one channel from 0 to 255. The tool splits the value, converts each pair, and renders the result as the RGB function — exact, no rounding, the same color expressed in decimal.
When to reach for it
Canvas and chart libraries take RGB tuples, image editors show decimal channels, and debugging color math is easier in RGB arithmetic. If you also need HSL for CSS variables, the full color converter shows all three at once.
Reading the result
rgb(51, 102, 153) means red at 51, green at 102, blue at 153 — higher numbers mean more of that channel. The first hex pair maps to the first number, and so on; once you know a few landmarks (ff = 255, 80 = 128, 00 = 0), reading HEX directly becomes second nature.
Frequently asked questions
What is the difference between HEX and RGB?
Only notation — both describe the same red-green-blue channels. HEX packs each channel into two hexadecimal digits; RGB writes them as decimal numbers. Choose whichever your context expects.
Does the tool handle 3-digit HEX shorthand?
Yes — #abc expands to #aabbcc before conversion, exactly as browsers expand it.
What about alpha transparency?
8-digit HEX (#RRGGBBAA) converts with the alpha shown separately in the RGB result. Plain 6-digit values convert as fully opaque.