Repository navigation
Add support for generating UUIDv7s #62529
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Mar 31, 2026 Hi, I’m interested in implementing UUIDv7 support in the crypto module.
I plan to create a createRandomUUIDv7() method following the RFC.
Please let me know if this aligns with maintainers’ expectations.Reacted by Reid Greer@nabeel378 ... no need to ask permission! Just go for it. A few recommendations: keep the implementation as simple as possible, include tests and documentation. Keeping it as a separate function
createRandomUUIDv7without touching the existingcreateRandomUUIDis ideal. Happy to review it once implemented.Reacted by nabeel378 and Reid Greer- addedcryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.
on Apr 2, 2026 @panva and @jasnell : do you think this useful feature should also trickle to the WebCrypto WG and/or Winter TC in order to be standardized across all runtimes?
Reacted by Michiel De Mey and Hunter TunnicliffYou can certainly propose it as a feature in the Web Cryptography tracker. The judge of its usefulness there will be implementer interest, seldomly has niche use case user interest translated to adoption tho.
Its mere presence in
node:cryptoshould have it trickle down to runtimes such as Deno, Bun and Cloudflare Workers through their node compatibility layers, such that they are.damianremington274-blip commented
on Apr 3, 2026 on Apr 3, 2026 via email · Hidden as low-qualityshow commentMore actions- added a commit that references this issue
on Apr 5, 2026 - added 2 commits that reference this issue
on May 5, 2026 In case anyone is interested in weighing in, I've added a proposal for this in the WebCrypto WG:
Reacted by Reid Greer and Gianluca Pettenon
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Progress
What is the problem this feature will solve?
UUIDv7s are time-based UUIDs which can be helpful for sorting & database distribution. The standard is published here: https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-7
Postgres recently shipped native support for UUIDv7 generation, and Bun has a helper
Bun.randomUUIDv7();Having to reach for a library in order to generate non-v4 UUIDs is a bummer and adds bloat for a very common workflow.
What is the feature you are proposing to solve the problem?
I'm proposing UUIDv7 generation support be included in the Crypto module.
The actual API for this could either follow Bun's path of a separate method
.createRandomUUIDv7(), or add in a property to the existingcreateRandomUUIDoptionsparameter such asversion. These are not mutually exclusive, and you could imagine the parameter & method both existing for convenience.Examples:
What alternatives have you considered?
No response