JSON Formatter
Validate, format and minify your JSON.
Convert HEX, RGB or HSL into all three formats, with an on-page color preview. Optional alpha values are supported and each result can be copied separately.
Preparing your tool…
Accepted inputs include 3, 4, 6 and 8-digit HEX, numeric or percentage RGB, HSL hue in degrees and optional alpha as a fraction or percentage. Hue wraps around 360 degrees. RGB channels round to 8-bit values, HSL displays one decimal place and alpha displays three, so round trips can differ slightly. Named colors, CSS variables, wide-gamut spaces and CSS calc expressions are not accepted. This is a format conversion tool, not a contrast or color-management checker.
Yes. Short and long HEX alpha, RGBA and HSLA are supported. Outputs include alpha when it is below 1.
RGB rounds to whole 8-bit channels, and HSL and alpha use display precision. Small rounding differences are expected.
No. Enter a concrete HEX, RGB or HSL value.