Why this matters
An API identifier is not merely a convenient string attached to a record. It appears in URLs, request bodies, logs, event messages, database columns, queue payloads, and error reports. Its structure affects how identifiers behave, what they reveal, how difficult they are to store and index, and whether a developer can recognize their order without consulting another field.
Uniqueness is only one requirement, and it is easy to confuse probabilistic uniqueness with a guarantee. A UUID version 4 contains 122 random bits, making an accidental collision extraordinarily unlikely, but uniqueness still depends on every generator producing distinct values. UUID version 1 combines time-related information with node-specific data, while version 7 places a timestamp ahead of random data so identifiers can be ordered by creation time. Each version also carries different privacy and operational consequences.
These choices become more visible at scale. A compact numeric key can be shorter, but it may expose business volume or reveal records that were deleted. A sequential integer is easy to order but may disclose information and can encourage clients to infer authorization boundaries. A random UUID avoids obvious counters but can scatter inserts across a database index. A time-ordered UUID such as version 7 preserves a rough chronological order while still using 128 bits of identifier space, although it reveals creation time and requires careful handling of the remaining random portion.
The process
- Define the identifier’s required properties before choosing a format. Decide whether it must work across independently deployed systems, whether clients should be able to create IDs, whether creation order must be recoverable, and whether the identifier may reveal when a resource was created. Do not choose a format solely because it looks random or because another service already uses it.
- Choose a broadly compatible family when interoperability matters. UUIDs are standardized 128-bit identifiers represented in the familiar 36-character hexadecimal form, including hyphens. Their textual length makes them longer than many numeric IDs, but they avoid a server-side counter and are suitable for distributed creation. If a project specifically requires an alternative such as ULID, note that the tools discussed here generate UUIDs, not ULIDs.
- Select the UUID version according to ordering and disclosure requirements. Use version 4 when there is no need to derive time order from the identifier and avoiding embedded creation-time information is important. Consider version 7 when chronological grouping is valuable and exposing creation time is acceptable. Version 1 is also available, but it is a less natural default for a new API because its time-related construction can disclose more than many teams intend.
- Set the amount to generate using the Quantity control. In the UUID Generator, enter the number required in Quantity:. For one API object, use a quantity of 1. For fixtures, load tests, or a set of integration-test resources, use a larger number. The quantity control makes it possible to generate several values without repeatedly running a single-value workflow.
- Run the generator and review the resulting identifiers. The UUID Generator supports versions 1, 4, and 7 and performs generation locally in the browser. It does not continuously update as you type, so generate after entering the intended quantity. Because the operation uses secure randomness, version 4 values are not derived from the time, a counter, or the entered text.
- Copy an identifier directly when it is needed immediately. Both UUID tools provide a copy action, so the selected result can be placed on the clipboard without manually transcribing a long hexadecimal string. This is convenient for an API request, a curl command, or a configuration value, but copying does not reserve the identifier or confirm that another system will not generate the same value.
- Use the Bulk UUID Generator when a dataset needs to leave the browser. Set the required count in Quantity:, generate the identifiers, and export them as JSON, CSV, or plain text. These formats serve different destinations: JSON fits structured application fixtures, CSV fits spreadsheet and tabular workflows, and plain text is useful for simple lists. The bulk generator also provides clipboard copying and file download.
- Use hashing only for content identity, not as a substitute for a generated record ID. In the Hash Generator, enter content in Text to hash and read the resulting values under Generated Hashes. The tool supports MD5, SHA-1, SHA-256, and SHA-512 and runs locally. Although a hash can detect whether the same content is present, it does not provide the generation properties, ordering behavior, or practical URL shape expected from an API identifier.
Worked example
Suppose an order service needs IDs that can be created by multiple service instances. The team wants to avoid a central sequence generator, but it also wants records created around the same time to remain roughly ordered in storage and logs. It accepts that the identifier will reveal a millisecond-level creation time, provided that the time is treated as operational metadata rather than a secret. UUID version 7 fits those requirements, so the developer opens the UUID Generator, enters Quantity: 1, and generates an identifier in the form 0195a6f2-cb71-7abc-a8de-123456789abc. The value is copied into a request such as POST /v1/orders. The client should still treat the identifier as opaque and should not derive authorization rights from the timestamp.
The same team now needs 500 test orders. It opens the Bulk UUID Generator and enters Quantity: 500. After generation, it exports the results as JSON for fixture loading, CSV for review in a spreadsheet, or plain text for a simple seeding script. This bulk workflow is the better fit because its purpose is to produce a reusable set and export it. It is less suitable than the version-specific UUID Generator for a design whose correctness depends on choosing version 1, version 4, or version 7.
The team also has an import job that records the SHA-256 hash of each uploaded manifest. It uses the Hash Generator with the manifest text entered under Text to hash, then reads the digest under Generated Hashes. The hash is useful for checking whether the later manifest is byte-for-byte identical to the expected content. It is not used as the order ID because a content digest represents the data being hashed rather than the identity of a newly created domain object.
Common mistakes
- Assuming a UUID proves global uniqueness. Version 4 provides probabilistic uniqueness through a large random space. Secure randomness reduces predictability, but it does not coordinate IDs across systems. A service that needs reservation, strict uniqueness, or auditable allocation must enforce that policy separately.
- Choosing version 7 without accepting its information disclosure. The timestamp portion can reveal when an object was created. That may be acceptable, but it can expose business activity patterns, creation bursts, or the timing of otherwise private actions.
- Using a hash as though it were a random record identifier. A deterministic hash repeats whenever its input repeats. It can also allow a recipient to recognize the same content by comparing digests. It neither provides random generation nor solves the design questions raised by time-ordered IDs.
- Using MD5 or SHA-1 for a new integrity requirement. These older algorithms remain useful for compatibility checks, but their collision resistance is unsuitable for adversarial integrity and security decisions. SHA-256 or SHA-512 is the more defensible choice among the available hashes.
- Treating a URL-safe identifier as permission to expose internal structure. Whether an ID contains a time, sequence, tenant identifier, or random component should be an explicit decision. Encoding internal information does not make it harmless or private.
- Ignoring the index behavior of random keys. A B-tree index generally benefits from nearby keys being inserted near one another. Random UUIDs can send inserts to dispersed index pages, while sequential integers have strong locality but disclose volume and may invite unsafe enumeration. Version 7 offers chronological grouping without reducing the identifier to a simple counter.
- Selecting an overly long identifier without considering transport costs. A canonical UUID string occupies more URL space than a short opaque key. That matters in links, headers, logs, and systems with limits, although correctness and uniqueness should not be traded away merely to shorten a string.
Limitations of this approach
- Browser generation is not server-side allocation. All three tools process their work locally and make no backend calls. They cannot reserve an ID, check a uniqueness constraint, coordinate with other systems, or record an allocation audit trail.
- The browser does not retain a generation history. None of the tools stores previous results locally. A generated value should be copied or downloaded when it matters; closing or reloading the page does not provide a durable record.
- The bulk tool does not expose the version-specific controls described for the UUID Generator. Use the Bulk UUID Generator for multiple UUIDs and JSON, CSV, or plain-text export. Use the UUID Generator when choosing among versions 1, 4, and 7 is the central requirement.
- The Hash Generator cannot open a file in this interface. Despite the broader idea of hashing files, it cannot accept a file upload or drag-and-drop. Its working input is text, and its output is intended for comparing or recording a digest.
- A generated identifier does not replace database constraints. Even a version 4 UUID should normally be protected by a unique constraint or equivalent enforcement. The tools do not validate identifiers against an application schema, API contract, or existing database.
- The browser is the wrong instrument for regulated key issuance. A public utility is suitable for development, testing, and many ordinary application IDs. It does not provide centralized governance, tenant-scoped allocation, signing, retention policy, revocation, or proof that an identifier was issued by a particular service.
Frequently asked questions
Should I use UUID version 4 or version 7 for a new API? Version 4 is appropriate when avoiding embedded creation time is more important than deriving chronology from the ID. Version 7 is appropriate when chronological grouping is useful and the team accepts that the identifier reveals its creation time.
Is version 4 truly unique? It is probabilistically unique to an extremely high degree because it uses 122 random bits. It is not the result of a central uniqueness check. Production systems still need appropriate uniqueness enforcement.
Does version 7 produce perfectly sequential IDs? No. Its time component supports chronological ordering, but the remaining random portion means two IDs created in the same time interval are not consecutive in the way a database sequence would be.
Should I use SHA-256 instead of a UUID? No, unless the identifier is specifically a content digest. A hash is deterministic, repeats for identical input, and is designed for hashing rather than allocating identities. SHA-256 is appropriate for integrity checks, not as a replacement for a random or time-ordered record ID.
Which tool should I use for a few UUIDs? Use the UUID Generator and set Quantity: to the number needed. It supports versions 1, 4, and 7 and lets the version choice remain part of the decision.
Which tool should I use for seed data? Use the Bulk UUID Generator. It generates multiple UUIDs and can export JSON, CSV, or plain text, making it more suitable for moving a generated set into fixtures or scripts.
Are UUIDs better than short numeric IDs? Not universally. UUIDs support distributed creation and resist simple counting, but they consume more URL and storage space. Numeric identifiers may be shorter and easier to index in some designs, while also exposing sequence information and requiring coordinated allocation.
Can these tools guarantee that an API will accept a generated ID? No. They generate values and export them. They do not contact the API, test its validation rules, reserve server-side resources, or verify that the identifier is absent from an existing data set.