Free Online Hex to RGB
Hex-to-RGB conversion unpacks a hex color code like #FF5733 into three 0–255 decimal channels suitable for CSS rgb() and Canvas APIs.
Your data is processed entirely in your browser and never sent to any server.
Accepts #RGB, #RRGGBB or #RRGGBBAA.
rgb(59, 130, 246)Formula
Split the 6 hex digits into RR, GG, BB pairs. Each pair is base-16 (00–FF) → decimal (0–255). 8-digit hex adds an alpha pair AA → alpha (0–1).
How to Use This Tool
- Paste a hex color (with or without the leading #) into the input field.
- Or click the swatch on the right to open your system's color picker.
- Read the live Red, Green and Blue channel values, each on the 0–255 scale.
- Click the copy icon to send the full rgb() or rgba() string to your clipboard.
What Is a Hex to RGB?
Hex notation is a compact base-16 encoding of an RGB triple defined by CSS Color Module Level 4. Every 6-digit string breaks into three pairs (RR, GG, BB), each a base-16 number from 00 to FF — which is 0 to 255 in decimal. Three-digit shorthand expands each digit (`#F53` becomes `#FF5533`), and 8-digit forms add an alpha channel from `00` (fully transparent) to `FF` (fully opaque).
This converter is the right tool when you're handed a hex from a spec sheet or sketch file and need RGB for a Canvas drawing context, a WebGL uniform, an image-processing pipeline that takes channel arrays, or a CSS variable preferring the `rgb()` notation for opacity tweaks via `color-mix()`.
It parses 3-, 6- and 8-digit inputs, shows the per-channel breakdown so you can sanity-check the math, and emits both `rgb()` and `rgba()` strings.
Frequently Asked Questions
What hex formats are accepted?
What is the conversion formula?
Does it support alpha (RGBA)?
Published by the WeGotEveryTool team. We build and test every tool in-house and update pages when the underlying spec, formula, or recommendation changes.
Reviewed: May 2026. Disclaimer: this tool is provided as-is for general informational use. For decisions with material consequences (medical, legal, financial, security) verify results against a qualified professional source.
Related Color & Design
Convert RGB values to hex color codes. Accepts comma- or space-separated input. Outputs 6-digit or 8-digit hex.
Convert HSL (hue, saturation, lightness) to RGB. Adjust sliders to see the change live, then copy hex or RGB.
Convert CMYK percentages (cyan, magenta, yellow, key) to RGB and hex for screen use. Print-to-digital workflow.
Pick any color with an interactive picker. See hex, RGB and HSL values update live, then copy in one click.
Generate complementary, analogous, triadic, tetradic and monochromatic color schemes from any seed color.