Hex to RGB Color Converter

Convert hex color codes to RGB values and back instantly. Free online color converter with live preview swatch. Supports 3-digit and 6-digit hex codes.

Loading tool...

Frequently Asked Questions

How do I convert hex to RGB?

Enter a hex color code (e.g., #14B8A6) and the tool instantly shows the RGB equivalent (20, 184, 166). The hex code is split into three pairs of hexadecimal digits representing red, green, and blue values (0-255 each).

What is the difference between hex and RGB?

Hex and RGB represent the same colors in different formats. Hex uses a 6-digit hexadecimal string (#RRGGBB), while RGB uses three decimal numbers (R, G, B from 0-255). Hex is more common in CSS; RGB is used in design tools and programming.

Does it support 3-digit hex codes?

Yes. Three-digit hex codes like #1A2 are automatically expanded to 6 digits (#11AA22) by doubling each digit. This follows the same convention used by CSS.

Can I convert RGB back to hex?

Yes. Enter RGB values (e.g., 20, 184, 166) and get the hex equivalent (#14B8A6). The conversion works bidirectionally with instant results. A color preview swatch updates in real-time.

Built by Michael Lip. 100% client-side — no data leaves your browser.