A complete, secure, and compact JavaScript library for generating RFC-compliant UUIDs across all versions.
uuid is a JavaScript library for generating RFC-compliant universally unique identifiers (UUIDs). It provides implementations for all standard UUID versions (v1-v7), ensuring unique identifiers for distributed systems, databases, and applications. The library solves the problem of creating reliable, collision-resistant IDs across different platforms and environments.
JavaScript and TypeScript developers building web applications, backend services, mobile apps (including React Native), or CLI tools that require unique identifier generation.
Developers choose uuid for its complete RFC compliance, strong security via crypto APIs, zero dependencies, and broad platform support. It offers a future-proof, standardized solution over ad-hoc ID generation methods.
Generate RFC-compliant UUIDs in JavaScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements all UUID versions (v1-v7) with utilities for conversion, validation, and version detection, as documented in the API summary and methods like v1ToV6.
Uses the modern crypto API for cryptographically strong random values, ensuring secure UUID generation across Node.js, browsers, and React Native, with fallback options for unsupported environments.
Has no external dependencies and is tree-shakable, minimizing bundle size and simplifying maintenance, as highlighted in the README's features and philosophy.
Includes a CLI utility for terminal-based UUID generation and an extensive API for parsing, stringification, and namespace-based UUIDs, demonstrated in the command-line section and examples.
Starting with uuid@12, CommonJS is no longer supported, forcing projects using require() to migrate to ES modules, which can break existing codebases without updates.
In environments like React Native or older browsers, additional packages (e.g., react-native-get-random-values) are needed to support crypto.getRandomValues(), adding setup complexity.
The extensive API supporting all UUID versions can be overwhelming if only basic random UUID generation (e.g., v4) is required, making lighter alternatives more appealing for minimal use cases.