← Back to Tools

Hex to RGB Converter

Enter a HEX color code to instantly see its RGB and HSL values with a live preview swatch. Works with or without the # symbol.

Converted Values

HEX#6366F1
RGBrgb(99, 102, 241)
Red99
Green102
Blue241
HSLhsl(239, 84%, 67%)
CSScolor: #6366F1;

About Hex to RGB Conversion

🎨 What is HEX?

HEX color codes use a six-digit hexadecimal number to represent colors in web design. The format is #RRGGBB where each pair represents Red, Green, and Blue intensity.

📐 What is RGB?

RGB defines colors using three channels — Red, Green, and Blue — each with a value from 0 to 255. It is widely used in CSS, design software, and displays.

🔄 Shorthand Support

This tool handles 3-digit shorthand like #F00 (which expands to #FF0000) and 6-digit codes. The # symbol is optional.

⚡ Instant & Free

No signup, no upload, no server calls. Conversions happen instantly in your browser as you type.

Frequently Asked Questions

What is a HEX color code?

A HEX color code is a six-digit (or three-digit shorthand) hexadecimal number used in web design and CSS to represent colors. For example, #FF5733 represents a red-orange color.

How do I convert HEX to RGB?

Split the six-digit hex code into three pairs (RR, GG, BB) and convert each pair from hexadecimal to decimal. For example, #FF5733 becomes R=255, G=87, B=51.

Do I need to include the # symbol?

No. This converter accepts hex codes with or without the leading # symbol. Both FF5733 and #FF5733 will produce the same result.

What is the difference between RGB and HSL?

RGB defines colors by Red, Green, and Blue channel intensity (0-255). HSL defines colors by Hue (0-360 degrees), Saturation (0-100%), and Lightness (0-100%). HSL is often more intuitive for humans to work with.

Related Tools