HEX to RGB Converter

Paste a hex colour code and get the RGB values, plus HSL, HSV and CMYK for the same colour.

Runs in your browser. Nothing you type is sent to a server.

How to use HEX to RGB Converter — Free Online Color Code Tool

  1. 1Type a hex code, RGB or HSL value, or a CSS colour name — or pick from the swatch.
  2. 2Every format is listed at once: HEX, RGB, HSL, HSV and CMYK.
  3. 3Copy the notation you need, or click a tint or shade to carry on from it.

About HEX to RGB

Hex is the most common way to write a colour in CSS, and RGB is the most common way to reason about one. Converting between them is pure arithmetic — each pair of hex digits is one of the three channels, written in base 16 — but doing it in your head is slow and easy to get wrong.

The 8-digit form catches people out. Modern CSS accepts #rrggbbaa, where the last pair is opacity, so a code that looks malformed is often just carrying an alpha channel. This converter reads all three lengths and shows the rgba() equivalent when alpha is present.

Alongside the RGB values you get HSL, HSV and CMYK for the same colour, which saves a second conversion when the value has to go into a design tool or a print spec.

Frequently asked questions

How do I convert hex to RGB by hand?
Split the six digits into three pairs and read each as a base-16 number. #1E90FF is 1E, 90, FF, which in decimal is 30, 144, 255 — so rgb(30, 144, 255).
What does a 3-digit hex code mean?
It is shorthand where each digit is doubled: #f60 expands to #ff6600. Only colours whose pairs both match can be written that way.
What are the last two digits in an 8-digit hex?
Alpha — opacity from 00 (fully transparent) to FF (fully opaque). This tool reads it and shows the matching rgba() value.
Do I need the # symbol?
No. It is added automatically if you leave it out.
Is it free?
Yes — unlimited use, no sign-up, no watermark and no limit on how many times you run it.