UUID v4 in the browser: random IDs without a server
What UUID version 4 means (RFC 4122), why crypto.getRandomValues matters, and how QSTools generates batches locally.
A UUID v4 is a 128-bit identifier with version and variant bits fixed per RFC 4122; the rest is random. Collision risk is negligible for normal app volumes. It is not a secret: treat it as a public ID, not an API key.
Versions at a glance
| Version | Source of uniqueness | QSTools today |
|---|---|---|
| v1 | Time + node | Not generated here |
| v3 / v5 | Name + namespace (hash) | Not generated here |
| v4 | Random | Yes — local crypto.getRandomValues |
What QSTools does
The UUID Generator creates one or a batch (up to 100) in your browser. Values never leave the device. Useful for test fixtures, client-side keys, and demos when you do not want a backend round-trip.
Canonical form looks like:
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
where the 4 marks version 4 and y is a variant nibble (8, 9, a, or b).
When not to use v4 alone
- Security tokens / session secrets — use a dedicated CSPRNG string (or our Password Generator), not a guessable-looking ID scheme you treat as confidential by habit.
- Sortable time-based IDs — consider ULID / UUIDv7 in your stack; v4 is unordered by design.
- Guaranteed platform integration — prefer your language’s standard library in production services; a browser tool is for local generation and learning.
Client-side generation is still the right default for privacy-sensitive demos: no server log of the IDs you just created.