24-Hour Time Regex

Example:
^([01]?[0-9]|2[0-3]):[0-5][0-9]$ Matches: ✓ 09:30 ✓ 23:59 ✗ 25:00 (invalid)
Validate 24-hour time (HH:MM): ^([01]?[0-9]|2[0-3]):[0-5][0-9]$
Try Regex Lab →

FAQs

Does it support seconds?

No, add :[0-5][0-9] for seconds: ^([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$