Lesson 4

Formats and Validation

Canonical, compact, braced, and URN forms plus version and variant checks.

The canonical UUID format is lowercase hex in an 8-4-4-4-12 layout:

550e8400-e29b-41d4-a716-446655440000

You may also see:

  • Compact UUIDs without hyphens
  • Uppercase UUIDs
  • Braced UUIDs like {550e8400-e29b-41d4-a716-446655440000}
  • URNs like urn:uuid:550e8400-e29b-41d4-a716-446655440000

Validation should check more than length. A useful validator normalizes the format, confirms hexadecimal groups, reads the version digit, and checks the variant bits.

When you want to practice, use the related DevCove tool — optional, not part of this lesson.

Open related tool

Back to course overview