GUIDs have a lot of common uses : primary keys in distributed databases and caches, temporary file and directory names, identifiers for types in the COM world…
You can generate them using a wealth of tools, depending on your situation.
1) With GuidGen
GuidGen is an interactive tool bundled with Visual Studio and the Windows SDK : on my computer I’ve one located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools and another in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin.
You can run GuidGen directly or you can run it from Visual Studio :
Both will display the same small UI with commands for generating new GUIDs in different formats and copying them to the clipboard.
2) With Guidgen Console
If you want a non-interactive (ie without UI) tool to be used in your batch scripts for instance you can use GuidgenConsole.
Here is a sample :
C:\>C:\opt\GuidGen\GuidGen.exe f78f217c-8efc-4974-abae-ffb3bce4d6c8
3) With online tools
If you need interactive generation from anywhere you can use an online generator like :
- guidgen.com :
- uuidtools.com :
It provides a REST API too.
4) With the .Net library
The most powerful tool is of course the .Net library itself, where GUIDs are represented by the Guid value-type, which is often used by the aforementioned tools.
If you need to generate GUIDs from .Net code this is the way to go.
Here is an implementation of an awesome GUIDs generator :
using System; class MyGuidGen { private static void Main() { Console.Write(Guid.NewGuid()); } }And how to compile and use it :
>csc MyGuidGen.cs Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.5420 for Microsoft (R) .NET Framework version 3.5 Copyright (C) Microsoft Corporation. All rights reserved. >MyGuidGen.exe 9d2a9104-add4-4af0-b72c-4362cd59db44 >MyGuidGen.exe 2b077434-be28-4941-9d22-3f7725c19795 >MyGuidGen.exe 2beb6579-ac8b-4581-82e2-acad598f9ce1You know other ways ? Please share by leaving a comment.
Thanks for the post I really appreciate it it was very useful
You can use the url below to generate GUID
http://lutils.com/GuidGenerator.aspx
It can generate up to 100 IDs per click 🙂
I use website below to generate guid (up to 100 guids per time)
http://lutils.com/GuidGenerator.aspx
I like the last method best. Awesome! Thanks.
Here’s a vbscript implementation. Save as > MyGuidGen.vbs and run from there.
Apologies in advance if this snippet doesn’t post properly.
Thanks for sharing this additional way. 🙂
Thank you for inviting us to share other ways to generate globally unique identifiers.
You can try the free and tiny TapGuid app for an easy way to create, copy, send or share GUIDs on your Android smartphone or tablet:
http://www.tecdrop.com/tapguid/
https://play.google.com/store/apps/details?id=com.tecdrop.tapguid
(As a UI extra, for each GUID, the app fills the screen with a different color shade, that is computed from the value of that ID.)
Interesting but what kind of use-cases does it cover ?
Because more often than not GUID generation is included in an automated process.
I use this tool https://codebeautify.org/guid-generator
I can only recommend https://www.mydigitaltoolbox.pro/tools/guid-generator/
hello, your article is good but I saw another tool that helped me so much that the tool is also very nice https://codebeautify.org/guid-generator
Python:
import uuid
uuid.uuid4()