UUID Generator - Random v4 UUIDs, Custom Format
Generate version 4 UUIDs in bulk with adjustable formatting, then copy or download the list as a text file.
UUID Generator
This tool creates version 4 UUIDs (Universally Unique Identifiers), the random variant defined in RFC 4122, entirely inside your browser. Choose how many to generate at once, from 1 up to 500, and pick a formatting style: with or without hyphens, upper or lower case, wrapped in curly braces or double quotes, and separated by commas or plain line breaks. The result appears in a text box that can be copied or downloaded as a plain text file.
How a version 4 UUID is built
A UUID is 32 hexadecimal digits split into five groups of 8-4-4-4-12, joined by hyphens for a 36-character string. Two of those digits are fixed rather than random: the first digit of the third group is always 4, marking the version, and the first digit of the fourth group is always 8, 9, a, or b, marking the RFC 4122 variant. The remaining digits come from the browser's Web Crypto API, crypto.randomUUID(), which gives 122 bits of randomness and roughly 5.3 x 10^36 possible values. Because the value is generated locally rather than assigned by a central registry, two people running this tool at the same moment will still get different results almost every time.
Worked example
Generating 8 UUIDs with hyphens removed and uppercase turned on takes a value such as 8f14e45f-ceea-4c9d-b8f2-1d3a9c4e77b1 and rewrites it as 8F14E45FCEEA4C9DB8F21D3A9C4E77B1, repeated for each of the 8 results, one per line. Turning on the comma option adds a trailing comma after every line except the last, the format most database import tools expect for a list of values. With quotes and braces both enabled instead, the same value becomes "{8f14e45f-ceea-4c9d-b8f2-1d3a9c4e77b1}", ready to paste directly into source code as a literal. The output can be downloaded as a .txt file named after the quantity, for example uuids-8.txt.
From placeholder to real value
A common use is replacing a placeholder identifier in a data record before it is saved:
// Before
{ "orderId": "" }
// After
{ "orderId": "8f14e45f-ceea-4c9d-b8f2-1d3a9c4e77b1" }