# ulid/spec

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ulid-spec).**

10,753 stars · 182 forks · GPL-3.0

## Links

- GitHub: https://github.com/ulid/spec
- awesome-repositories: https://awesome-repositories.com/repository/ulid-spec.md

## Description

This project provides the official specification for ULIDs, which are 128-bit identifiers that combine a millisecond-precision timestamp and random data. These identifiers are designed to be lexicographically sortable, ensuring that they maintain a strict chronological sequence for database indexing and time-based sorting.

The specification defines a standard for binary-to-string serialization using a Crockford-inspired Base32 alphabet. This encoding is intended to produce human-readable strings while excluding ambiguous characters to prevent transcription errors.

The technical standards cover monotonic sequencing rules to preserve the order of identifiers created within the same millisecond. It also details the partitioning of the 128-bit identifier into fixed-width segments for timestamps and random data.

## Tags

### Web Development

- [Time-Sortable](https://awesome-repositories.com/f/web-development/high-performance-web-services/id-services/time-sortable.md) — Generates identifiers that are naturally ordered by time for efficient database indexing.

### Data & Databases

- [Unique Identifier Generators](https://awesome-repositories.com/f/data-databases/data-management/unique-identifier-generators.md) — Produces globally unique identifiers that maintain chronological sort order. ([source](https://github.com/ulid/spec/blob/master/README.md))
- [Monotonic Identifier Generation](https://awesome-repositories.com/f/data-databases/monotonic-identifier-generation.md) — Ensures identifiers generated within the same millisecond are produced in a strictly increasing sequence.

### Operating Systems & Systems Programming

- [System Timestamping](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/system-clock-utilities/timestamp-injection/system-timestamping.md) — Prefixes identifiers with a millisecond timestamp to guarantee chronological ordering.

### Software Engineering & Architecture

- [Millisecond Clock Sequences](https://awesome-repositories.com/f/software-engineering-architecture/causal-ordering-timestamps/millisecond-clock-sequences.md) — Implements sequence numbers that reset per millisecond to preserve chronological order.
- [Identifier Generators](https://awesome-repositories.com/f/software-engineering-architecture/identifier-generators.md) — Creates unique 128-bit identifiers combining temporal data and randomness.
- [Identifier Specifications](https://awesome-repositories.com/f/software-engineering-architecture/identifier-specifications.md) — Provides the official technical specification for the ULID identifier standard.
- [Base32 Encoding](https://awesome-repositories.com/f/software-engineering-architecture/base64-encoding-and-decoding/base32-encoding.md) — Uses a specific Base32 alphabet to encode binary identifiers into human-readable strings.
- [Binary-to-String Transformations](https://awesome-repositories.com/f/software-engineering-architecture/binary-to-string-transformations.md) — Implements the conversion of binary identifier data into human-readable textual representations.
- [Bit-Range Field Mapping](https://awesome-repositories.com/f/software-engineering-architecture/memory-layout-optimizations/bit-packed-storage/bit-range-field-mapping.md) — Defines the exact bit ranges for timestamps and random data within the 128-bit structure.

### Security & Cryptography

- [Binary-to-Text Encodings](https://awesome-repositories.com/f/security-cryptography/binary-to-text-encodings.md) — Transforms binary identifier data into text to prevent human transcription errors.
