What is a HEX to RGB converter?
A HEX to RGB converter changes how an sRGB color is written. HEX uses hexadecimal pairs such as FF, while RGB uses decimal red, green, and blue channels from 0 to 255. The notation changes, but the displayed color does not.
This converter accepts one color at a time and updates immediately. It also shows normalized 0–1 values and channel percentages for tools that use those ranges.
How to convert HEX to RGB
- Enter a 3- or 6-digit HEX color, with or without
#, or select the color preview. - Check the preview and the red, green, and blue channel values.
- Copy the RGB format required by your code or design tool.
There is no Convert button. A valid input updates every result immediately.
HEX to RGB example
For the HEX color #FF5733, split the six digits into three pairs:
FF 57 33Convert each hexadecimal pair to decimal:
Red: 255Green: 87Blue: 51The resulting CSS color is rgb(255, 87, 51).
Supported HEX formats
The converter supports:
#RGBandRGB#RRGGBBandRRGGBB- Uppercase or lowercase letters
- Surrounding whitespace and one trailing semicolon
A 3-digit value expands by repeating each digit. For example, #F09 becomes #FF0099.
Four- and eight-digit HEX colors include an alpha channel. This tool identifies those inputs but does not discard their transparency or convert them to RGB.
RGB output formats
The same RGB channels can be copied as legacy comma-separated CSS, modern space-separated CSS, raw comma- or space-separated channels, CSS percentages, or normalized 0–1 values.
Normalized values divide each channel by 255 and use up to three decimal places. Percentage values use up to one decimal place.
HEX vs. RGB
HEX is compact and common in stylesheets and design tokens. RGB exposes the three channels directly, which is useful for CSS functions, Canvas code, graphics libraries, and design software. Both notations can represent the same sRGB color exactly when no alpha channel is involved.
Use the RGB to HEX Converter for the reverse direction. Use HEX to HSL Converter when you want hue, saturation, and lightness.
HEX to RGB FAQ
Does the # symbol matter?
No. Both #FF5733 and FF5733 are accepted and produce the same RGB values.
Can I convert a 3-digit HEX color?
Yes. Each digit is repeated before conversion, so #03F is treated as #0033FF.
Are uppercase and lowercase HEX colors different?
No. Hexadecimal letters are case-insensitive. #ff5733 and #FF5733 represent the same color.
What is the RGB channel range?
Each channel ranges from 0 to 255. This tool also displays the equivalent 0–1 and 0–100% values.
Does converting HEX to RGB change the color?
No. The conversion changes only the notation, not the underlying sRGB channel values.
Why does an 8-digit HEX color show a transparency message?
The last two digits are an alpha channel. Plain RGB cannot preserve that transparency, so the converter does not silently remove it.