Back to guides

UUID Generator|Batch UUID v4 for mocks, OpenAPI, and SQL seeds

Generate 1–50 RFC 4122 v4 IDs in the browser with crypto randomness—paste into mock JSON, Swagger examples, or INSERT drafts without installing a uuid package.

By WGinit · November 22, 2026 · 5 min read

When v4 is the right choice

Frontend mocks, contract tests, and seed scripts often need plausible id, requestId, or traceId values before backend owners pick snowflakes versus UUIDs. Version-4 identifiers use 122 random bits in the canonical 8-4-4-4-12 lowercase hex shape that PostgreSQL uuid, CHAR(36), and UUID.randomUUID() consumers expect. Using incrementing integers in mocks buys short-term convenience and long-term migration pain when production switches primary-key strategy.

UUID Generator on WoDeTool emits v4 only—no time-based v1, no namespace v3/v5. When you need lexicographic sorting by creation time, switch to ULID Generator. The page fills bits with crypto.getRandomValues locally; each click builds the list for the count field (1–50). Requesting hundreds of IDs belongs in a script or database function, not repeated clicks.

Contract reviews sometimes catch id: 1 in shared mocks while production already ships string uuids; regenerating ids before the PR lands avoids a second argument about column types. Hash-based fingerprints for fixtures belong on Hash Generator when you need deterministic checksums of file contents, not when you need opaque primary keys.

Generate and copy

Set Count, click generate, then copy one row or use Copy all when more than one UUID appears—newline-separated text pastes cleanly into spreadsheets, VS Code columns, or shell heredocs.

A valid v4 shows 36 characters, version nibble 4 in the third group, and variant bits 8/9/a/b in the fourth group. Slack or chat paste sometimes injects zero-width spaces; strip them or run through another editor before ORM validation rejects the value.

WoDeTool does not persist generated lists server-side; closing the tab drops them. Do not paste production customer IDs into public tickets—use fresh random placeholders for examples.

Wire into mocks and seeds

Pair with Mock Test Data: declare id as a string with uuid format, generate JSON, then replace individual id values with rows copied from this tool before you hand the file to JSON Formatter. Export to operations via JSON to CSV when needed.

For SQL seeds, draft INSERT INTO app_user (id, email) VALUES ('…'), ('…') and quote each uuid. Rename tables in bulk with Text Replacer using a narrow scope so column names stay untouched.

OpenAPI example fields often require a syntactically valid uuid string; copying one line from the generator is faster than spawning a REPL. When examples live in YAML, reconcile with JSON↔YAML outputs using JSON Diff if only identifiers should change.

End-to-end workflow (diagram)

Hands-on order: lock field names and column types → generate enough v4 rows here → paste into the target artifact → validate with JSON Formatter or Text Diff.

Teams often keep five spare ids in a scratch doc so deleting rows during pairing does not require reopening the tool.

Privacy, limits, and triage

Random v4 carries no business semantics—good for sanitized demos. Treat real production uuid values like opaque secrets when your API authorization model depends on unpredictability.

Deterministic end-to-end suites should mock randomUUID inside test runners; browser batch generation is for humans, not frozen regression baselines. Million-row load tests belong on gen_random_uuid() or service-side batch endpoints—the UI cap of fifty is a ergonomics guardrail, not a cluster limit.

FAQ

QWhat is the maximum per click?

AThe input allows 1–50. Generate additional batches and concatenate text, or call crypto.randomUUID() from your own script.

QHow is this different from Mock Test Data?

AMock builds whole documents from schema. Use UUID Generator when you only need a list of ids or must pin specific primary keys manually.

QWe need sortable correlation ids for logs?

Av4 is not sortable by time. Prefer ULID Generator or your platform snowflake.

QMySQL stores BINARY(16)—does this tool output that?

AThis page prints canonical strings. Convert with UUID_TO_BIN or driver helpers at the database—WoDeTool does not emit hyphen-stripped hex.

Worked example (step by step)

1. Staging demo needs eight users; GET /users is not deployed yet.

2. Open Mock Test Data for skeleton objects; open UUID Generator, set count 8, generate.

3. Copy all lines; paste each uuid into the matching id property (edit inside JSON Formatter if needed).

4. Change emails to @example.com placeholders; save as mocks/users.json.

5. Validate JSON with JSON Formatter; diff against yesterday with JSON Diff.

6. Pin Storybook to the first uuid in the list.

7. Flyway seed: INSERT INTO users (id,name) VALUES ('','Demo'); using the second line.

8. If QA reports “invalid uuid”, check for truncated paste or full-width hyphens; regenerate one row.

Version bits and interoperability

RFC 4122 treats the version field as four bits in the third group; clients that only check string length will still accept malformed values, which is why copying from a trusted generator beats hand-typing hex. Java, Go, and .NET serializers usually accept lowercase; databases may uppercase on insert—diff tools should compare case-insensitively when reviewing seeds.

When a column maps to ORM uuid.UUID or Prisma String @db.Uuid, confirm migrations expect 36-character text, not 32-character hex without hyphens. Liquibase and Flyway changelogs pasted from this tool should keep single- or double-quote style consistent with your SQL dialect.

JWT jti claims and OAuth state parameters sometimes reuse uuid formatting without being RFC-compliant v4; do not assume every 36-character field in a legacy API is a database primary key.

Team handoff without locale path spam

Link teammates to the Guides hub and the UUID Generator tool page—language toggles live in the site chrome, so runbooks do not need hard-coded /en/ or /zh/ prefixes in ticket templates.

When pairing with backend, attach both the mock JSON and a one-line note listing how many ids were browser-generated versus ORM-defaulted; reviewers spot accidental duplicate keys faster.

If ids collide after merge, regenerate only the conflicting rows instead of rerolling the entire mock file; JSON Diff highlights which objects changed.

Related tools

Related guides