Skip to main content
New Participant
January 14, 2025
Answered

Is there simple way to generate many UUIDs?

  • January 14, 2025
  • 3 replies
  • 401 views

I want to geneate 100+ UUIDs,is there simple way?

    Correct answer Jack Handson

    1. Use programming? it is very easy, a loop for 100 times.

    2. You can also use web online tools, just like:  generateguid.com

    3 replies

    BKBK
    Community Expert
    January 15, 2025

    Using an online tool is indeed a simple way to generate many UUIDs. But you should beware of two subtle factors.

    1.  Though you may use the names UUID and GUID interchangeably, they stand for two different things. UUID = Universally Unique IDentifier and GUID = Globally Unique IDentifier.
      UUID is a universal definition, whereas GUID is a Microsoft definition.
      So, strictly speaking, you should only call it GUID when you're within a Microsoft context. Otherwise, call it UUID.

    2.  UUID has a version. You should therefore beware of which version to use.
      If version does not matter to you and you just need to generate a UUID, then Version 4 is what you want. Version 4 UUIDs are generated from random or pseudo-random numbers.

      Example of online tool to generate many UUIDs, taking version into account: Online UUID Generator.
    Jack HandsonCorrect answer
    New Participant
    January 14, 2025

    1. Use programming? it is very easy, a loop for 100 times.

    2. You can also use web online tools, just like:  generateguid.com

    Peter_HuAuthor
    New Participant
    January 14, 2025

    Yes, online web tool is my want, Thank you!

    Charlie Arehart
    Community Expert
    January 14, 2025

    It's not clear what aspect of this you're wanting help with. Is there a reason something as simple as this doesn't suit you?

     

    <cfscript>
    arr=[] 
    for (i=1;i<=100;i++){
       arrayappend(arr, CreateUUID())
    }
    writedump(arr) 
    </cfscript>

     

    Of course, that can be done in tags instead. And there's probably some clever functional programming that could effect the same result in perhaps still fewer lines. That said, if you put semicolons at the end of each line, all that code could be on a single line. 🙂 

    /Charlie (troubleshooter, carehart. org)
    Peter_HuAuthor
    New Participant
    January 14, 2025

    Thank you.