Convert HEX color codes to RGB values. Enter a HEX code or RGB values and the result appears instantly.

HEX colors (#FF5733) and RGB colors (rgb(255, 87, 51)) represent the same colors in different notations. HEX is commonly used in CSS and design tools, while RGB is used in programming, CSS functions, and some design applications.
Each HEX color is 6 digits: the first 2 are red (00–FF), the next 2 are green, the last 2 are blue. RGB uses decimal values 0–255 for each channel.
Converting between HEX and RGB is essential for web development, CSS styling, design system documentation, and cross-tool color consistency.
All calculations run locally in your browser — nothing is sent to any server.
#3B82F6 to rgb(59, 130, 246) in your stylesheets.HEX uses base-16: each pair of digits (00–FF) converts to decimal 0–255. #FF5733: FF=255 (red), 57=87 (green), 33=51 (blue).
Shorthand HEX: #F53 expands to #FF5533. Each digit is doubled.
To convert RGB to HEX: convert each decimal channel to 2-digit hexadecimal. rgb(255, 87, 51) → FF, 57, 33 → #FF5733.
| Feature | HEX | RGB |
|---|---|---|
| Format | #RRGGBB | rgb(R, G, B) |
| Values | 00–FF (hex) | 0–255 (decimal) |
| Opacity | 8-digit (#RRGGBBAA) | rgba(R, G, B, A) |
| Shorthand | #RGB (3 digits) | No shorthand |
| Used in | CSS, design tools | CSS, programming |

Have an idea, found a bug, or want to suggest a feature? Drop us a message – we respond within 24 hours.