Free Hex to RGB Converter

Convert any HEX color code to its RGB values instantly. Paste a 3- or 6-digit hex — with or without the # — and get the red, green, and blue channels plus a copy-ready rgb() value and a live preview swatch.

rgb(—)

Channel values

Red—
Green—
Blue—
Private by design. This tool runs 100% in your browser — your code is never uploaded to any server.

How to Use the Hex to RGB

  1. Type or paste a HEX code like #22d3ee or 2de.
  2. The RGB values convert instantly as you type.
  3. Check the preview swatch to confirm the color.
  4. Click Copy to grab the rgb() value for your code.

Features

The converter accepts 3-digit shorthand (#2de), full 6-digit codes, and input with or without the leading hash, validating each character as you type. Output shows the three channel values individually plus the assembled rgb() function call, alongside a live swatch — everything updates on every keystroke with no button needed.

Benefits & Use Cases

Developers translating designer hex specs into canvas code, CSS rgba() overlays, or native app color APIs get exact channel values in one step. The live validation catches typos (like a 5-digit code or a stray “G”) immediately instead of failing silently downstream.

Tips

Need transparency? Take the RGB triplet and write rgba(34, 211, 238, 0.5) — the alpha value goes from 0 (invisible) to 1 (solid). For the reverse conversion, use the RGB to Hex tool.

Frequently Asked Questions

How do I convert HEX to RGB manually?

Split the 6-digit hex into three pairs; each pair is a base-16 number from 0 to 255. For example, #22d3ee gives red=0x22 (34), green=0xd3 (211), blue=0xee (238), i.e. rgb(34, 211, 238).

What is 3-digit HEX shorthand?

Each digit is doubled: #2de is the same as #22ddee. This tool expands shorthand automatically.

Why do I need RGB instead of HEX?

Some APIs and functions require separate channels — canvas fillStyle math, rgba() transparency, color interpolation in animations, and native mobile color constructors.

Is the conversion exact?

Yes. HEX is simply RGB written in hexadecimal, so the conversion is lossless in both directions.

Is my input sent anywhere?

No. Conversion runs entirely in your browser; nothing is uploaded or stored.

Related Tools