Free Hex to RGB Color Converter
A hex to RGB converter translates a six-character hexadecimal color code (like #FF6B35) into its red, green, and blue numeric values (255, 107, 53). Use this free tool to convert between HEX, RGB, HSL, and CMYK formats instantly with live preview and copy-ready CSS output.
Values clamp automatically to the 0-255 range.
#FF6B35rgb(255, 107, 53)hsl(16, 100%, 60%)cmyk(0%, 58%, 79%, 0%)--color: #FF6B35;bg-[#FF6B35]How to convert HEX to RGB
- 1Enter your HEX color code
Type or paste a HEX value (with or without #) into the HEX field. Three-digit codes like #FFF are expanded automatically.
- 2Read the RGB values
The RGB values appear instantly as red, green, and blue numbers from 0 to 255, alongside the full rgb() CSS string.
- 3Copy CSS-ready output
Click the copy icon next to any output - HEX, RGB, HSL, CMYK, CSS variable, or Tailwind class - to copy it to your clipboard.
- 4Or convert RGB back to HEX
Type R, G, and B numbers and the HEX code updates instantly. The conversion is fully bidirectional.
What is a hex color code?
A hex color code is a six-character string written in base-16 (hexadecimal) that represents a color on the web. The first two characters encode the red channel, the middle two encode green, and the last two encode blue. Each pair runs from 00 to FF - equivalent to 0 through 255 in decimal RGB.
Hex codes are usually written with a leading # symbol (#FF6B35) and can be shortened to three characters when each pair shares the same digits, so #FFF is identical to #FFFFFF. They first appeared in early HTML and remain the most common way to specify colors in CSS today.
Because hex and RGB describe the same color in different notations, converting between them is purely arithmetic - no information is lost in either direction.
Frequently Asked Questions
What is HEX to RGB conversion?
HEX to RGB conversion translates a hexadecimal color code (six characters representing red, green, and blue in base-16) into three decimal numbers from 0 to 255. Both formats describe the exact same color - HEX is shorter for CSS, while RGB is easier to manipulate in code.
How do I convert hex #FF6B35 to RGB?
Split #FF6B35 into three pairs - FF, 6B, 35 - and convert each from base-16 to base-10. The result is rgb(255, 107, 53). Paste #FF6B35 into the converter above to get this answer instantly along with HSL and CMYK equivalents.
What's the difference between HEX and RGB?
HEX and RGB are two notations for the same color values. HEX uses a single six-character hexadecimal string (#FF6B35), while RGB uses three decimal numbers from 0 to 255 (rgb(255, 107, 53)). Browsers render them identically - choose whichever is easier to read in your code.
Can I convert 3-digit hex codes like #FFF?
Yes. Three-digit hex codes are shorthand where each character is duplicated, so #FFF expands to #FFFFFF (rgb(255, 255, 255), pure white) and #F0A becomes #FF00AA. Paste any 3-digit code into the converter and it will expand and convert automatically.
Is RGB or HEX better for CSS?
HEX is typically shorter and the most common choice in stylesheets. RGB and its alpha-aware sibling rgba() are required when you need transparency or want to compute color values dynamically with CSS variables or JavaScript. Modern CSS supports all formats interchangeably.
Related Tools
Want more developer tools? NitroClaw ships fast, no-signup utilities for everyday workflows.
Explore NitroClaw