HEX to RGB Converter in your browser, no signup

HEX to RGB Converter in your browser, no signup

By Hami Tech·February 11, 2026·Updated February 16, 2026·5 min read

A HEX code is just RGB written in base 16. #6366f1 splits into three pairs - 63, 66, f1 - which are 99, 102 and 241 in decimal, the red, green and blue channel values. Same colour, different notation, and the conversion between them is arithmetic rather than interpretation. The reason several formats exist is that each suits a different job. HEX is compact and dominates CSS and design tools. RGB exposes the individual channels, which is what you need when code has to calculate or animate a colour. HSL - hue, saturation, lightness - is the one most people underuse and should reach for more: building a lighter variant of a colour means changing one number instead of guessing three, which is why design systems are usually defined in HSL. CMYK belongs to print and is the one format where a mathematical conversion is only a starting point, because ink behaviour depends on paper and profile. Everything converts live in your browser.

You should not have to open an IDE to format a snippet from Slack, tidy a JSON blob, or check a hash. Paste it here, copy the result, move on.

HEX to RGB Converter is a good fit when converting a brand HEX code into RGB for code that animates or calculates colour.

In plain English

HEX to RGB Converter is built around a few practical wins, not a long feature list:

  • Six formats from one input, so you never need a second converter.
  • Handles 3, 4, 6 and 8 digit HEX including alpha, which many converters do not.
  • Live preview, so you see the colour rather than trusting the numbers.
  • Runs in your browser with recent colours kept locally.
  • No account and no limit.

How to run it

  1. Enter a HEX code. With or without the hash, in 3, 4, 6 or 8 digits. The 8-digit form includes alpha.
  2. Read every format at once. RGB, RGBA, HSL, HSV, CMYK and decimal all update live, so no second conversion step is needed.
  3. Copy the one you need. HEX for CSS, RGB for code that manipulates channels, HSL for building variants.
  4. Use HSL to create variations. Adjust lightness alone to produce hover, disabled and background shades that stay in the same colour family.

Real situations

  • Converting a brand HEX code into RGB for code that animates or calculates colour.
  • Getting HSL values to build a consistent palette of lighter and darker variants.
  • Producing CMYK starting values for a print supplier.
  • Translating a colour from a design tool into the format your framework expects.
  • Adding transparency to an existing colour by converting HEX to RGBA.

Small habits that help

  • Use HSL when you need variants. Changing lightness alone keeps the hue consistent, which manual RGB adjustment rarely achieves.
  • For transparency in CSS, either 8-digit HEX or RGBA works - pick one and use it consistently across the codebase.
  • Treat CMYK output as a starting point and confirm with your printer, who works to a specific colour profile.
  • Once you have a colour, check it against its background with the Colour Contrast Checker before using it for text.
  • Define design tokens in HSL where your tooling allows. It makes generating a full scale from one base colour straightforward.

Skip these

  • Sending mathematically converted CMYK to a printer as final values without confirming against their profile.
  • Building lighter and darker shades by adjusting RGB channels by eye, which shifts the hue as well as the brightness.
  • Assuming 8-digit HEX works everywhere. Support is broad in modern browsers but older environments and some tools still expect RGBA.
  • Mixing HEX with alpha and RGBA arbitrarily across a codebase, which makes colours hard to search and maintain.
  • Picking a colour on the numbers alone without checking contrast against the background it will sit on.

Does anything leave your device?

HEX to RGB Converter runs in your browser. The file or text you paste stays on your device. There is no account, and nothing is stored on a ToolBox server for this job.

If this is one step in a longer job, these usually come after it:

FAQ

What is 8-digit HEX?

An 8-digit HEX code adds two characters for alpha (opacity) on the end - #ff000080 is red at 50% opacity. The 4-digit form is its shorthand, exactly as #f00 is shorthand for #ff0000. All four lengths are supported here.

Why does my CMYK look different from my print shop's?

CMYK conversion depends on the specific inks, paper and colour profile being used. The values here use the standard mathematical conversion, which is correct as a starting point, but a print shop working to a specific ICC profile will produce slightly different numbers.

What is the decimal value for?

It is the colour packed into a single 24-bit integer, which some APIs, game engines and design tools use instead of a HEX string. It is the same colour expressed differently.

Is my colour history saved anywhere?

Recent colours and favourites are stored in your own browser's local storage. Nothing is sent to a server, and clearing your browser data clears the history.

When should I use HSL instead of HEX or RGB?

Whenever you need variants of a colour. Lighter, darker or less saturated versions come from changing a single HSL number, whereas adjusting RGB channels by eye tends to shift the hue as well. This is why most design systems define their palettes in HSL.

How do I add transparency to a HEX colour?

Either append two hex digits for alpha - #6366f180 is 50% opacity - or use the RGBA value shown here. Both are valid in modern CSS; pick one convention and apply it consistently.

Open the HEX to RGB Converter when you are ready. It is free, and you do not need an account.