UUID v7 Generator

This tool generates version 7 UUIDs, the modern, time-ordered identifier designed to be both unique and naturally sortable by creation time. A UUID is a 128-bit value used to identify things without a central authority, but the older random version 4 has a drawback for databases: because its bits are random, new UUIDs scatter throughout an index, hurting insert performance and locality. Version 7 fixes this by putting a millisecond timestamp in the leading bits, followed by random bits for uniqueness. The result is an identifier that is still practically guaranteed to be unique, yet sorts in roughly the order it was created, which keeps database indexes tidy and makes UUID v7 the recommended choice for new primary keys. This generator creates them for you. You choose how many UUIDs you want, and the calculator produces that many version 7 identifiers, each with a fresh timestamp and cryptographically strong random bits, in the standard 8-4-4-4-12 hexadecimal format. A regenerate button gives you a new batch whenever you need one. Everything runs locally in your browser using its secure random source, so the identifiers are never sent anywhere, which matters when they are used as keys. The results update as you change the count. Use it to seed a database with sortable keys, to generate test identifiers, to learn how version 7 is structured, or wherever you would otherwise reach for a UUID but want time ordering. Because several generated in the same millisecond share the timestamp prefix, the random portion keeps them distinct and the overall order still tracks creation time. You can spot a version 7 UUID by the digit seven at the start of its third group, just as version 4 has a four there.

-

Version 7 UUIDs embed a millisecond timestamp then random bits, so they sort by creation time. Generated locally with a secure random source; nothing is uploaded. Up to 50 at a time.

How it works

Each version 7 UUID starts with the current time in milliseconds since 1970, packed into the first 48 bits, which makes it sortable by creation time. The version digit 7 and a variant marker are set in fixed positions, and the remaining bits are filled with cryptographically strong random values to guarantee uniqueness, even for several generated in the same millisecond.

Worked example

Asking for five UUIDs returns five identifiers like 0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b, each beginning with an encoded timestamp. Generated moments apart, they share a similar leading portion and sort in creation order, while the trailing random bits keep them distinct. The seven at the start of the third group marks them as version 7.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.