Home › Developer & Design Tools › HEX to RGB Converter

HEX to RGB Color Converter

Paste a HEX code and get the RGB, RGBA and HSL values for your project.

Private by design: your files and text are processed in your browser and are not uploaded to our servers.

Quick answer: Split the code into three pairs, then read each pair as a base 16 number. For #1a73e8 the pairs 1a, 73 and e8 are 26, 115 and 232.

About this tool

A HEX colour such as #1a73e8 is a compact way of writing three numbers: how much red, green and blue to mix. Paste a HEX code and this tool shows those numbers as rgb(), the same colour with alpha as rgba(), and as HSL, which is handy when you want to make a colour lighter or darker.

It understands short codes like #fff, standard six-digit codes and eight-digit codes that include transparency.

How to use it

  1. Type or paste a HEX code, with or without the # sign.
  2. See the swatch and the RGB, RGBA and HSL values.
  3. Copy the format you need.

Good to know

Key features

Limitations

Privacy and security

Runs in your browser; the file is not sent to any server.

Frequently asked questions

How do I convert HEX to RGB by hand?

Split the code into three pairs, then read each pair as a base 16 number. For #1a73e8 the pairs 1a, 73 and e8 are 26, 115 and 232.

What is the difference between RGB and HSL?

RGB mixes light, while HSL describes hue, saturation and lightness. HSL is often easier for tweaking a colour.

Does it accept uppercase or lowercase?

Both work.

What is an eight-digit HEX code?

It is a six-digit colour followed by two digits for transparency.

More tools you may need

Related guides

Last reviewed: 2026-11-23. Found a mistake? Tell us. See our tool accuracy policy.