UUID Generator

 

Your UUID

Bulk Generation



UUID API

An API is available to generate UUID.

GET https://api.extendsclass.com/uuid/:UUIDVersion?limit=:Limit

Generate UUID.
UUID versions: v1, v3, v4, v5.
Limit: Number of UUID to generate (Max: 1000, Default: 1).

JavaScript example:
const request = new XMLHttpRequest();
request.open("GET", "https://api.extendsclass.com/uuid/v4?limit=10", true);
request.onreadystatechange = () => {
};
request.send();
	
Response
Success: 200
[
   "aa5d758e-7646-45a6-bd67-7916eac77301",
   "4b60125d-9abf-4838-a348-c50bad1810ac",
   "d1fe1f34-9d6e-44d6-a7ed-86976cec26a0",
   "cd3a77fd-647b-4ef3-aea5-0192334c442f",
   "024365c4-3e8d-416d-9539-44cb5e3f7cef",
   "cb7332b7-5bea-4cb5-b85c-c13e403fbfff",
   "dafb6e2a-9e62-43f8-a5c7-93e2a368a9a2",
   "d75373fc-1862-4d3c-97cc-d0ce657cacd8",
   "7f96802b-eae9-473c-a8b6-38280914ff6d",
   "af9f326d-00b1-4234-bb19-06b1eeff9c1f"
]
Error: 400
UUID version is not available
Error: 400
Too many uuid to generate

What is an UUID ?

An UUID (universally unique identifier) is a 128-bit number used to identify information.

UUID are represented as 32 hexadecimal digits, displayed in groups separated by hyphens (total of 36 characters with hyphens). Form: 8-4-4-4-12. For example: d036ac19-1269-49e0-8d3d-2a9ebb67ba6d

There are fives versions of uuid, and each version may be more appropriate than the others in specific use cases.

  • Version-1 UUID is generated using the MAC address and a timestamp.
  • Version-2 UUID is reserved for DCE security, and RFC does not provide any details! That is why we do not offer this version on this page.
  • Version-3 and version-5 UUIDs are generated by hashing a namespace identifier and name. This tool uses the namespace "c34efe6d-c540-45c9-b71a-51896f1fa2a8", and uses a uuid as name.
  • Version-4 UUID is randomly generated.

How to generate UUID ?

This tool allows you to generate UUID online.

An UUID is automatically generated as soon as you access this page.

You can also generate multiple UUIDs at once. See Bulk section.

You can also generate UUID with a REST API. See API section.

This online UUID generator uses the npm module uuid.

Why uses an UUID instead of id ?

In development, we often use identifiers for all kinds of data/objects. The question is whether a simple identifier is sufficient or whether you need a UUID.

A UUID may be needed in the following cases (non-exhaustive list):

  • You do not want a authority (Probably a database) to centrally control the identity of records.
  • Multiple components may independently generate a non-unique identifier.

When it is not useful, it is not recommended to use an UUID. Indeed, this type of identifier takes 36 characters, which can deteriorate performance. This impacts the amount of data to store, but also to index. In addition, integer comparison is more efficient than character string comparison. These drawbacks are all the more problematic as the number of records increases.

So when it is not necessary it is better to use an id (Single database, natural key, ...).


You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).

Comments