HEX to RGB Converter
Paste a HEX colour like #3B82F6 and get its rgb() triplet instantly, with a live swatch. Needed whenever you want to add an alpha channel or animate a colour in CSS.
Live Preview
rgb(37, 99, 235)
hsl(221, 83%, 53%)
Popular color conversions
About HEX to RGB Converter
HEX to RGB conversion turns a six-digit hexadecimal color code (#RRGGBB) into red, green, and blue channel values from 0–255. This is one of the most common color conversions in web development.
Enter a HEX value such as #2563EB (with or without the #). The tool instantly shows rgb(37, 99, 235) and updates the live preview swatch.
#2563EB → rgb(37, 99, 235)
Need transparency later? Start from RGB and extend to rgba() in CSS. HEX stays best for concise brand tokens.
Need all formats at once? Open the full Color Converter, or read the HEX to RGB CSS guide.
Frequently Asked Questions
Is HEX to RGB conversion exact, or does it round?
It's exact. Each pair of hex digits (00–FF) maps directly to an integer from 0–255, so #2563EB always becomes exactly rgb(37, 99, 235) with no rounding in either direction.
Why would I need RGB if my CSS already uses HEX?
RGB channels are required for rgba()/opacity, Canvas 2D and WebGL pixel APIs, and most color-manipulation JavaScript, none of which accept a HEX string directly.
Does this tool support 3-digit shorthand HEX like #25E?
Enter the expanded 6-digit form. Shorthand HEX (#RGB) needs to be doubled per channel first — for example #25E expands to #2255EE before converting.
Are my colors uploaded to a server?
No. Conversion runs entirely in your browser using simple arithmetic — no network request is made.