This is a JavaScript/TypeScript library for generating UUIDs (Universally Unique Identifiers). A UUID is a standardized 128-bit identifier formatted as a string of hexadecimal characters separated by dashes, like "b18794e8-5d0d-417c-b361-ba38e78411b4." They are used in software to give records, sessions, files, or any other entity a unique ID that is statistically guaranteed not to collide with others, even when generated independently across different systems. The library supports all versions of UUID defined in RFC9562 (the current standard, updating the older RFC4122). The most commonly used is v4, which is purely random. Version 1 and v6 are based on the current timestamp, version 3 and v5 are generated from a name and a namespace (using MD5 or SHA-1 respectively), and v7 is based on Unix Epoch time. The library also provides utilities to validate a UUID string, detect which version it is, and convert between binary and string representations. It is designed to be compact: it has zero dependencies and is tree-shakable, meaning a bundler can include only the specific UUID version functions your code actually uses. It uses the browser and Node.js "crypto" API for secure randomness. It works across Chrome, Safari, Firefox, Edge, Node.js, and React Native/Expo. Starting with version 12, the library no longer supports CommonJS module format. Installation is via npm install uuid.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.