Convert valid UUID text without changing the underlying 128-bit identifier. Case, hyphens, braces and the urn:uuid prefix are representations of the same value, so this workflow is useful at API, database and copy-paste boundaries.
Key takeaways
- Formatting a UUID does not generate a new identifier.
- Validate before converting so malformed input is not silently normalized.
- Use one canonical storage format even when clients accept several representations.
For implementation context, continue with No Hyphens, Uppercase, and Lowercase. These pages cover the closest generator, comparison, validation or storage decisions without repeating this guide.
What UUID conversion changes
A canonical UUID is usually shown as lowercase hexadecimal in an 8-4-4-4-12 pattern. Removing hyphens, changing letter case, adding GUID braces or adding a URN prefix changes the text representation, not the 128 bits it represents.
That distinction matters when a UUID is used as a key. A converter should preserve every hexadecimal digit and only alter the requested wrapper or separators.
Normalize at system boundaries
Accept common UUID representations at an input boundary, validate the version and variant, then store a canonical value or a native UUID type. Normalization prevents case-sensitive string comparisons and inconsistent joins from becoming application bugs.
Do not use text conversion as an authorization check. A valid identifier still needs ownership, existence and permission checks on the server.
Lossless compact formats
Removing hyphens produces 32 hexadecimal characters and remains lossless. Base58 and Base64url can encode the full 128 bits more compactly, while truncating the UUID discards entropy and raises collision risk.