UUID Generator
Generate universally unique identifiers instantly.
100% client-side. Your data never leaves your browser.
About UUID Versions
Cryptographically random. Most commonly used. Best for general-purpose unique IDs.
Time-based with node ID. Contains creation timestamp. Useful for time-ordered IDs.
New standard. Unix timestamp prefix makes it sortable. Great for database primary keys.
26-char, case-insensitive, lexicographically sortable. URL-safe alternative to UUID.
In Laravel
The Str helpers generate the same identifiers as this page:
use Illuminate\Support\Str;
(string) Str::uuid(); // version 4, random
(string) Str::uuid7(); // version 7, starts with a timestamp
(string) Str::ulid(); // ULID, 26 characters
For a primary key, add the HasUuids trait to the model and a uuid column to the migration. Since Laravel 12, HasUuids generates UUIDv7. Laravel 11 generated ordered version 4 UUIDs, and the HasVersion4Uuids trait keeps that behavior.
// Migration
$table->uuid('id')->primary();
// Model
use Illuminate\Database\Eloquent\Concerns\HasUuids;
class Order extends Model
{
use HasUuids;
}
Columns that point to such a model use foreignUuid(), for example $table->foreignUuid('order_id')->constrained().
Laravel 13.x docs: UUID and ULID keys, Str::uuid7(), uuid columns
Client-Side
All processing happens in your browser. Your data never touches our servers.
No Signup
Use unlimited times without creating an account.
Instant Results
Generate hundreds of UUIDs instantly with bulk generation support.
Related Tools
Need something custom built?
I build custom Laravel tools, web apps, and SaaS platforms. If you need something beyond off-the-shelf, let's talk.
ContactFrequently Asked Questions
Should I use UUID v4 or v7 for a primary key?
Version 7 in most cases. It starts with a timestamp, so new rows go to the end of the primary key index. Random version 4 IDs spread inserts across the whole index, which makes inserts slower on large tables. The effect is largest on MySQL, where InnoDB stores the table itself in primary key order. The cost of v7: anyone who sees the ID can read when the row was created.
How does Laravel store a uuid column?
$table->uuid() creates char(36) on MySQL, the native uuid type on PostgreSQL and on MariaDB 10.7 or newer, and varchar on SQLite. The native type stores 16 bytes in place of 36 characters.
When should I use a ULID instead?
A ULID also starts with a timestamp, but it is 26 characters long instead of 36 and has no hyphens, which makes it shorter in URLs. Laravel supports it with the HasUlids trait and $table->ulid(). Choose UUIDv7 when you want the standard format that PostgreSQL's uuid type and most other tools understand.