RGB to Hex Converter – Free, Online, Private
Convert an RGB triplet to a six-digit hex color. Channels must be integers from 0 to 255.
How to convert RGB to Hex
- Paste rgb(99, 102, 241) or 99, 102, 241.
- Read the #rrggbb value in lowercase.
- Copy it into a stylesheet or a design tool.
Accepted forms
The parser looks for three integers. The CSS function rgb(r, g, b) works, and so does a bare 99, 102, 241 or three numbers separated by spaces. Percentages are not accepted, because 50% is not the same path as the byte this page prints. Alpha in rgba is ignored only when the first three numbers are present; the fourth number is not encoded. Each channel must be between 0 and 255. A float is not rounded; write the integer you mean.
Hex form
The output is always # plus six lowercase hex digits, two per channel, with a leading zero when the byte is below 16. That is the form CSS and most design tools paste cleanly. Three-digit shorthand is not used, even when the color would allow it, so #ffffff stays six digits and a later search can find it. The inverse page accepts both lengths on the way back.
Worked example
rgb(99, 102, 241) is #6366f1. rgb(0, 0, 0) is #000000. rgb(255, 255, 255) is #ffffff. A channel of 15 becomes 0f, not f, so the pairs stay aligned. If a screen reader or a log printed the channels in a sentence, paste only the three numbers.
Why not the full picker
The color converter on Utilo also speaks HSL and OKLCH and shows a swatch. Use it when you are exploring. Use this page when you already have the triplet and you want the hex in one paste. The math is integer formatting. Nothing is uploaded.
Frequently asked questions
Will the hex be shorthand?
No. You always get six digits so the value is stable.
Are percentages supported?
No. Use byte channels from 0 to 255.
What about alpha?
It is not encoded. The output is an opaque hex color.
Is the color uploaded?
No.