Hex to RGB Converter
Paste a hex color code and instantly see the matching RGB and HSL values with a live preview swatch.
How it works
- 1
Type or paste any hex color code — three-digit shorthand like #f80 or the full six-digit form like #ff8800 both work.
- 2
The swatch updates instantly so you can see the color at a glance.
- 3
Copy the RGB or HSL value you need with one click. Nothing leaves your browser.
Questions
What hex formats are accepted?
Three-digit (#rgb), six-digit (#rrggbb), and eight-digit (#rrggbbaa) hex codes. The tool expands shorthand automatically.
What is the eight-digit form for?
The last two hex digits represent the alpha channel (transparency). #ff000080 is a half-transparent red.
Is my input sent to a server?
No — all conversion happens in your browser. Your color values never leave your device.
More developer tools
JSON Formatter
Paste compact or messy JSON and get it back neatly indented with your chosen spacing.
JSON Minifier
Remove all whitespace and line breaks from a JSON document to shrink it as small as possible.
JSON Validator
Check whether a JSON string is well-formed, and see the exact line and column of any syntax error.
JSON Beautifier
Reformat JSON with sorted keys and readable indentation for easier reading and diffing.
JSON Tree Viewer
Explore a JSON document as an interactive collapsible tree — expand and collapse any node.
XML Formatter
Pretty-print XML with configurable indentation, preserving attributes, comments, and tag order.
XML Validator
Check XML for well-formedness and report every error with its line and column number.
YAML Formatter
Normalize and re-indent YAML, or convert it to JSON, with a configurable indent width.