UUIDs are useful when you need an identifier that is unlikely to collide across systems, devices, or users. They are common in databases, logs, request tracing, and test fixtures because you can generate one immediately without coordinating a sequence number.
Version 4 UUIDs are random, which is excellent for uniqueness but not ideal when you want the values to sort in creation order. If you need sortable identifiers, use a different scheme, but for general purpose IDs this generator is a strong default.
Version 4 UUIDs are random 128-bit identifiers — use them for database primary keys, request tracing, or test fixtures where global uniqueness matters more than sort order.
Identifiers come from browser crypto where available. Do not treat UUIDs as passwords.
Integration tests need stable-looking identifiers without colliding with production UUIDs. Generate fresh v4 values per test case and paste them into factory data or mock API responses.