Color
HEX Color Validator
Validate HEX color codes online. Check 3, 4, 6 and 8 digit HEX colors, normalize values and preview the result instantly.
Tool
Validate HEX color codes online. Check 3, 4, 6 and 8 digit HEX colors, normalize values and preview the result instantly.
This tool runs in your browser. Your input is processed locally and is not uploaded.
About this Tool
Use this free HEX color validator to check whether a HEX color code is valid. Validate short and long HEX values, normalize casing, expand shorthand colors and preview the resulting color instantly.
Examples
- #fff
- #ffffff
- #000000
- #ff573380
Frequently Asked Questions
What is a valid HEX color?
A valid HEX color usually starts with # and contains 3, 4, 6 or 8 hexadecimal characters depending on whether shorthand or alpha transparency is used.
What is the difference between 3-digit and 6-digit HEX?
A 3-digit HEX code is shorthand. For example #fff expands to #ffffff and #000 expands to #000000.
What is an 8-digit HEX color?
An 8-digit HEX color includes an alpha channel for transparency, such as #ff573380.
Can I preview the HEX color?
Yes, the tool should show a live preview when the entered HEX value is valid.