TypeID is a type-safe identifier system that extends UUIDv7 with a human-readable prefix, inspired by Stripe's ID format.
The problem TypeID solves is the difficulty of distinguishing between different entity types when working with generic UUIDs, and the poor database locality of random identifiers like UUIDv4. TypeID addresses this by prepending a type prefix to a 128-bit UUIDv7, creating identifiers like user_01ARZ3NDEKTSV4RRFFQ69G5FAV. The prefix makes the entity type immediately obvious during debugging and in logs, while the UUIDv7 component ensures sortability and good database locality. The encoding uses a modified base32 scheme that is URL-safe, case-insensitive, and more compact than traditional hex UUID encoding at 26 characters instead of 36.
TypeID suits projects that need globally unique identifiers with type safety and database-friendly sorting characteristics. It is particularly valuable in systems where you want to prevent accidentally using a user ID where a post ID is expected, and where maintaining good database locality matters for performance. The tool is compatible with UUIDs since removing the type prefix yields a valid UUIDv7, making it a superset of the UUID standard rather than a breaking alternative.
The project maintains official implementations across Go, SQL, and TypeScript that adhere to a formal specification. Community implementations exist in additional languages, indicating adoption beyond the core maintainers. The specification itself is versioned and evolving, with implementations tracking different spec versions as the standard matures.