UUID Use Case

UUID Device ID

A device ID lets you recognise 'this phone' across sessions without cookies that follow a person. A UUID is anonymous and resettable.

AnonymousResettablev4

Generated locally with the Web Crypto API — nothing leaves your browser.

What Is UUID Device ID?

How to generate

  1. Generate a v4 UUID on first launch; persist it.
  2. Send it as a header or in analytics payloads.
  3. Offer a reset that mints a new UUID.

Use Cases

Code Examples

JavaScript
let did = localStorage.getItem('did') ?? crypto.randomUUID();
localStorage.setItem('did', did);

Frequently Asked Questions

Device ID vs cookie?
A device ID is app-scoped and resettable; cookies are domain-scoped and subject to consent rules.
Is it PII?
On its own, no — it is a random value with no link to a person until you associate it.

Related tools