Developer Tools

Hex to RGB Converter

Convert colors between HEX, RGB, and HSL instantly, in either direction, inside your browser.

Private by default Instant results No signup
Hex to RGB ConverterLive
Converted values
CodeValueHTML/CSS
Hex2F6FED
RGB47, 111, 237
HSL220, 84, 56
HSV220, 80, 93
OKLCH0.57, 0.2, 262
CMYK80, 53, 0, 7
Recently checked
Colors you check will appear here.
Overview

What color formats does this convert?

Colors on the web are commonly written in three interchangeable formats: HEX (a six-digit code like #2f6fed), RGB (red, green, and blue values from 0 to 255), and HSL (hue, saturation, and lightness). This tool converts between all three live, with a color picker and preview swatch.

Guide

How to use it

1Enter a hex color or pick one visually
2Or type R, G, B values directly
3See HEX, RGB, and HSL update together
4Copy whichever format you need

How the conversion works

HEX and RGB are two representations of the exact same value — each pair of hex digits is simply the base-16 form of a 0-255 red, green, or blue channel. HSL is calculated from RGB using the standard formula that separates a color into hue (its position on the color wheel), saturation (intensity), and lightness.

Why it helps

Features & benefits

Converts between HEX, RGB, and HSL simultaneously
Native color picker alongside manual input
Live preview swatch
Copy button for each format
100% private — nothing leaves the device

Why this runs entirely in your browser

Every conversion is simple math that runs in JavaScript locally in the tab, which means it keeps working offline once the page has loaded and nothing entered here is ever sent to a server.

Common uses

Converting a design tool's hex color into CSS rgb() notation, translating a brand color into HSL to adjust its lightness, or checking what a color code actually looks like.

Frequently asked questions

A few things people usually want to know before trusting the numbers.

Yes — shorthand hex codes like #fff are automatically expanded to their full 6-digit equivalent before converting.

They all describe the exact same colors, just with different notation. HEX and RGB use red/green/blue channel values, while HSL separates a color into hue, saturation, and lightness, which can be more intuitive for adjusting shades.

Hex codes must be 3 or 6 valid hex digits, and RGB values must each be between 0 and 255 — anything outside that range can't represent a valid color.

No, this tool converts solid RGB colors only, without an alpha channel.

No. All conversion happens locally in your browser. Nothing entered here is sent to a server, stored, or shared.