<!--
-- This file is auto-generated from README_js.md. Changes should be made there.
-->
# uuid [](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [](https://github.com/uuidjs/uuid/actions/workflows/browser.yml)
For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formerly [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs
- **Complete** - Support for all RFC9562 UUID versions
- **Cross-platform** - Support for...
- [Typescript](#support)
- [Chrome, Safari, Firefox, and Edge](#support)
- [NodeJS](#support)
- [React Native / Expo](#react-native--expo)
- **Secure** - Uses modern `crypto` API for random values
- **Compact** - Zero-dependency, [tree-shakable](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking)
- **CLI** - [`uuid` command line](#command-line) utility
<!-- prettier-ignore -->
> [!NOTE]
>
> Starting with `uuid@12` CommonJS is no longer supported. See [implications](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) and [motivation](https://github.com/uuidjs/uuid/issues/881) for details.
## Quickstart
**1. Install**
```shell
npm install uuid
```
**2. Create a UUID**
```javascript
import { v4 as uuidv4 } from 'uuid';
uuidv4(); // ⇨ 'b18794e8-5d0d-417c-b361-ba38e78411b4'
```
For timestamp UUIDs, namespace UUIDs, and other options read on ...
## API Summary
| | |
| --- | --- |
| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) |
| [`uuid.MAX`](#uuidmax) | The max UUID string (all ones) |
| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes |
| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string |
| [`uuid.v1()`](#uuidv1options-buffer-offset) | Generate a version 1 (timestamp) UUID |
| [`uuid.v1ToV6()`](#uuidv1tov6uuid) | Convert a version 1 UUID to version 6 |
| [`u