ULID Generator
Generate Universally Unique Lexicographically Sortable Identifiers with high performance
Generate ULIDs Fast
Compare & Patch JSON Online
Fast, efficient, and sortable identifiers for modern applications
Get Started
Generate ULIDs
Fast, efficient, and sortable identifiers for modern applications
All data stays in your browser. Nothing is sent to a server.
Options
ULID vs UUID
Why ULID is better than UUID in many situations?
ULID
RecommendedTime Sortable
First 10 bytes are Unix time that sorts naturally
Crockford's Base32
More efficient encoding, case insensitive, no special characters
Monotonicity Option
Can generate monotonically increasing values for the same timestamp
Human Readable
Easier to debug and read in logs and databases
ULID Example:
UUID
Not Time Sortable
Random bytes don't provide any ordering guarantees
Hex Encoding
Less efficient, requires more characters for same information
No Monotonicity
No built-in mechanism for monotonically increasing values
Less Readable
Harder to distinguish and identify in logs and databases
UUID Example:
Performance Comparison
Code Examples
Implementation examples in popular programming languages
// Node.js / Browser
// Installation: npm install @ulid/javascript
import { ulid } from '@ulid/javascript';
// Generate a new ULID
const myUlid = ulid(); // "01F8MECHZX3TBDSZ7XR8H8J1R4"
// Create ULID with custom timestamp (milliseconds)
const customTimestamp = 1616239022000;
const ulidWithCustomTime = ulid(customTimestamp);
// Create monotonically increasing ULIDs (for multiple IDs in the same ms)
import { monotonicFactory } from '@ulid/javascript';
const monotonic = monotonicFactory();
const ulid1 = monotonic(); // "01F8MECHZX3TBDSZ7XR8H8J1R4"
const ulid2 = monotonic(); // "01F8MECHZX3TBDSZ7XR8H8J1R5" (incremented)
// Extract timestamp from ULID
const timestamp = ulid.decode(myUlid).time;
console.log(new Date(timestamp).toISOString());
JavaScript: npm install @ulid/javascript