Free HEX to RGB Converter
Convert a HEX color code to its RGB and RGBA form, instantly and entirely in your browser.
How to convert HEX to RGB
-
1
Enter a HEX code
Type a HEX color, with or without the leading #.
-
2
Read the RGB values
The RGB and RGBA fields update automatically as you type.
-
3
Copy the value you need
Click "Copy" next to RGB or RGBA to grab it for your CSS.
Example use cases
Adding transparency to a brand color
Convert a HEX brand color to RGBA so you can dial in an alpha value for overlays or hover states.
Working with a design tool that only shows HEX
Some design exports only list HEX — convert to RGB for CSS functions like rgba() or canvas drawing code.
Debugging a CSS variable
Quickly check what a HEX value actually looks like in RGB when comparing against another color format in code.
Frequently asked questions
Which HEX formats are accepted?
3-digit (#abc), 4-digit with alpha (#abcd), 6-digit (#aabbcc), and 8-digit with alpha (#aabbccdd) — with or without the leading #.
What's the difference between the RGB and RGBA output?
RGB shows just the red, green and blue channels. RGBA adds a fourth alpha (opacity) value, taken from an 8-digit HEX code if you entered one, or defaulting to fully opaque.
Is my input uploaded anywhere?
No. The conversion happens locally in your browser using JavaScript — nothing you type is sent to a server.
I need to go the other way — RGB to HEX
Use the dedicated RGB to HEX Converter, or the combined Color Converter which handles HEX, RGB and HSL in both directions.