Thousands of tools! Check out Online Tools – I have now added thousands of tools.
I often have to generate random GUIDs so I created this simple online utility that does it for me. It lets you generate as many random globally unique identifiers as you need with any version number and variant number. It works in the browser and is powered by alien technology from the future.
Random Guid Generator Options
Random Guid Generator Examples (click to try!)
{61d0f615-1c17-384d-a7a5-1c56e95d4dc0} {bbc9167e-842e-3b25-9ab1-03263ec585e4} {761d2d38-c004-3c5d-b40b-55daaf5b5be5} {c80ee270-d239-3516-acdd-2494bfcef211} {a4d38748-768b-3c62-b19f-8850d172ea68} {e6f365ce-5a85-3b6d-8064-25e0fc43a58e} {38ea9946-c9a9-3377-b666-727253307a90} {f8cb4fea-7304-365e-8f6f-f3090fd7c426}
{5c163324dc132398c20a660001fc6941} {e92f445dd8422c67d1e72f979793aaf2} {edb3f5fc187324d6c701246fd146b2ad} {3af5bc1e794c20f3c42caa2433f31e35} {0fe441224a812905df68ae90fac2f63f} {a4c2472034da2962cf5555c42a356af1} {1dce853873bb2e69c6c5e43e170c9100} {e4e7846e70962199c99d0000ad681188} {a4f118e6e60422adc93c7484cc5e068a} {2379e7d1400926aec72490d3c5c6d573} {2f66f899e9cd23b8dbc82898cd2d701e} {b60093d00eb62933d0aec07037979464}
{8C0408BB-03F0-4A95-3684-8CE77B961F2B} {ABA8F601-67F2-444E-451E-7BEC497D00DA} {30D409DB-E0D6-4A9E-3E19-05E422A7AB6A} {89604608-EB58-4DCE-6008-7E344F81A247} {93AE4DB2-F162-4ECA-5DE8-852826A74A8B} {26F300E3-E267-420E-562A-C1CA386AE28D} {051F26F3-4781-47EF-063E-97BEE144A7FE} {A21F76B0-40F8-4506-6C88-EF6FC2478E9D} {42E27711-B89E-4C88-609C-A989985DDCB8} {A4E3075D-81C6-45AB-5669-A392E011ECE1}
How Does This Random Guid Generator Work?
This random GUID generator works entirely in your browser and is written in JavaScript. A GUID (Globally Unique Identifier) as defined in RFC 4112 is a 128-bit number that allows information to be identified in a unique way. The probability of two pieces of information having two identical keys is astronomically low. A GUID is usually represented as a string of 32 hex digits that are divided into five hyphen-separated groups of sizes 8-4-4-4-12 and enclosed in curly braces: {dddddddd-dddd-Addd-Bddd-dddddddddddd}
. To generate random GUIDs, the program assigns this string to the variable format
and replace()
s the letters d
with hex digits, and letters A
and B
with GUID version and GUID variant. To generate a hex digit for the d
character, it calls the chooseOne
function with an array of all hex digits as its argument chooseOne(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'])
. This function randomly picks and returns one of the elements in the array by selecting a random index in it arr[parseInt(arr.length*Math.random())]
. The letter A
denotes the GUID version and can take values from 1
to 5
. In the options, you can select which versions you want to generate. Depending on the activated versions, the program fills the array versions
with possible values. For example, if you selected versions 2 and 3, then versions
is set to [2, 3]
. Then it randomly selects one of the versions by calling chooseOne(versions)
. The letter B
denotes the GUID variant and can vary from 0
to f
. The possible variants are also configurable in the options and their values are stored in the variants
variable. Similar to versions, the code to select a random variant is chooseOne(variants)
. Depending on the value count
, the program loads and replaces the format string multiple times in a for
loop. Each generated GUID is push
ed to the array guids
. When the loop finishes, the program uses the function map()
to adjust the output GUIDs format and they are printed to the screen via the console.log
function.
Created by Browserling
This random guid generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.