HEX to RGB Converter
Paste a hex code and this HEX to RGB converter shows the matching RGB and HSL values instantly, each with a copy button. It runs entirely in your browser, handles 3- or 6-digit hex with or without the #, and is free with no sign-up.
Pick and copy colors.
How to use the hex to rgb
- Type or paste your hex code into the editable HEX field, with or without the # (3- or 6-digit both work), or click the native color picker to choose one.
- Read the RGB line, which shows the converted red, green and blue values on the 0 to 255 scale as rgb(r, g, b).
- Click the copy button next to the RGB value to grab the full rgb() string for your CSS.
- Check the HSL readout and the individual R, G, B, H, S and L stats if you want to reason about a single channel or about hue and lightness.
- Need the reverse or a full palette? Jump to the sibling RGB to HEX converter or the palette generator, which use the same tool.
About the hex to rgb
This HEX to RGB converter turns a hex color code into its red, green and blue channel values in one step. Type or paste a hex value into the editable field, or nudge the native color picker, and the readout updates live: the same color expressed as HEX, as RGB, and as HSL, each with a one-click copy button. It accepts short 3-digit hex (like #f0c) and full 6-digit hex (like #ff00cc), and it does not care whether you include the leading #. That flexibility matters when you are pulling a code out of a design file, a CSS snippet, or a brand guide and just want the rgb() version to drop into your stylesheet.
The conversion itself is straightforward once you see it. A 6-digit hex code is three pairs of hexadecimal digits, one pair each for red, green and blue. Each pair is a base-16 number from 00 to FF, which is 0 to 255 in the decimal RGB scale the tool shows. So #FF00CC splits into FF, 00 and CC, which become 255, 0 and 204, giving rgb(255, 0, 204). A 3-digit hex is just shorthand where each digit is doubled, so #F0C expands to #FF00CC and lands on the same RGB triple. The individual R, G, B, H, S and L stat readouts below the main values let you sanity-check a single channel without doing the math by hand, and the HSL line is handy when you would rather reason about hue, saturation and lightness than raw channels.
This page is one view of the same free Color Picker tool used across the site, so once you have your RGB values you can keep going in the same window. If you need to go the other direction, the RGB to HEX converter turns rgb() values back into a # code, and the palette generator builds shades, tints and harmonies from whatever color you land on. Everything is client-side, nothing is uploaded, and there is no sign-up. One honest limitation: it converts codes you type or pick, so it cannot sample a color out of an uploaded image and it has no Pantone or print-spot database.
Frequently asked questions
- How do I use this hex to rgb converter?
- Paste or type a hex code into the HEX field, or pick a color with the native picker. The RGB value appears instantly as rgb(r, g, b), and you copy it with the button beside it. HSL is shown at the same time.
- Does it accept 3-digit hex codes and codes without the # sign?
- Yes. The editable HEX field takes short 3-digit hex like #f0c and full 6-digit hex like #ff00cc, and the leading # is optional in both cases. A 3-digit code is simply expanded by doubling each digit before conversion.
- How does hex convert to RGB?
- A 6-digit hex is three pairs of base-16 digits, one pair per channel. Each pair (00 to FF) becomes a decimal number from 0 to 255. For example #FF00CC splits into FF, 00 and CC, which are 255, 0 and 204, giving rgb(255, 0, 204).
- Can it also give me HSL, not just RGB?
- Yes. Alongside HEX and RGB, the tool shows the same color as HSL with its own copy button, plus separate H, S and L stat readouts. That is useful when you would rather adjust hue, saturation or lightness than individual RGB channels.
- Can this converter pick a color from an image or give a Pantone code?
- No. It converts hex codes you type or pick, so it cannot sample a color from an uploaded image, and it has no Pantone or print-spot database. It focuses on accurate HEX, RGB and HSL values for screen and CSS work.
- Is it free and does everything stay in my browser?
- It is completely free with no sign-up, and all conversion happens client-side in your browser. Nothing you enter is uploaded. This hex to rgb page is one view of the same Color Picker as the RGB to HEX, palette and gradient tools.