UUID v4 Regex Pattern

Example:
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ Matches: ✓ 550e8400-e29b-41d4-a716-446655440000
Validate UUID v4 format: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Try Regex Lab →

FAQs

What is the "4" in the pattern?

UUID v4 always has "4" in that position to indicate version 4 (random).