Convert HEX to RGB
Free, Instant HEX to RGB Color Conversion
Need to use Convert HEX to RGB right now?
Paste a hex code from a design file and get the exact RGB values needed for canvas, SVG, or older CSS syntax.
79
Red70
Green229
BlueFeatures
- Runs entirely in your browser
- Privacy-first — your data is never uploaded
- Real-time, instant results
- 100% free, no sign-up required
- Works on desktop, tablet, and mobile
- No installation needed
Who uses this tool?
About Convert HEX to RGB
HEX and RGB represent exactly the same color information in two different number formats — HEX uses base-16 (hexadecimal) notation compactly packed into a single string, while RGB expresses the same three color channels as separate base-10 numbers from 0 to 255. Converting between them is a lossless, exact mathematical operation, not an approximation.
This tool takes any HEX color code — with or without the leading #, and supporting both 6-character (#4f46e5) and shorthand 3-character (#4fe) formats — and converts it to its exact RGB equivalent, showing the red, green, and blue channel values individually alongside the full rgb() CSS syntax.
This conversion comes up constantly when moving a color value between contexts that expect different formats — a design tool exports HEX, but a canvas drawing operation or certain JavaScript color libraries expect RGB values as separate numbers rather than a single hex string.
This is useful for web development requiring RGB format specifically, understanding a HEX color's individual red/green/blue intensity, or converting a color picked from a design tool into the exact numeric format your code needs.
How it works
- Enter a HEX color code. With or without the #, in 6-character or 3-character shorthand form.
- View the RGB equivalent. Both the full rgb() syntax and individual channel values.
- Copy the result. Ready to paste directly into your code.
Examples
Standard 6-character HEX
Input
#4f46e5
Output
rgb(79, 70, 229)
Shorthand 3-character HEX
Input
#fff
Output
rgb(255, 255, 255)