SkillAgentSearch skills...

Typeid

Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

Install / Use

/learn @jetify-com/Typeid
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TypeID

A type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

License: Apache 2.0 Join Discord Built with Devbox

What is it?

TypeIDs are a modern, type-safe extension of UUIDv7. Inspired by a similar use of prefixes in Stripe's APIs.

TypeIDs are canonically encoded as lowercase strings consisting of three parts:

  1. A type prefix (at most 63 characters in all lowercase snake_case ASCII [a-z_]).
  2. An underscore '_' separator
  3. A 128-bit UUIDv7 encoded as a 26-character string using a modified base32 encoding.

Here's an example of a TypeID of type user:

user_2x4y6z8a0b1c2d3e4f5g6h7j8k
└──┘ └────────────────────────┘
type    uuid suffix (base32)

A formal specification defines the encoding in more detail.

Online Converter

You can try converting UUID to TypeID and back using Jetify's TypeID Converter. Paste your TypeID string to convert to UUID or put your prefix and UUID in this format: prefix:UUID to convert to TypeID.

jetify.com/typeid

Benefits

  • Type-safe: you can't accidentally use a user ID where a post ID is expected. When debugging, you can immediately understand what type of entity a TypeID refers to thanks to the type prefix.
  • Compatible with UUIDs: TypeIDs are a superset of UUIDs. They are based on the upcoming UUIDv7 standard. If you decode the TypeID and remove the type information, you get a valid UUIDv7.
  • K-Sortable: TypeIDs are K-sortable and can be used as the primary key in a database while ensuring good locality. Compare to entirely random global ids, like UUIDv4, that generally suffer from poor database locality.
  • Thoughtful encoding: the base32 encoding is URL safe, case-insensitive, avoids ambiguous characters, can be selected for copy-pasting by double-clicking, and is a more compact encoding than the traditional hex encoding used by UUIDs (26 characters vs 36 characters).

Implementations

Implementations should adhere to the formal specification.

Latest spec version: v0.3.0

Official Implementations by jetify

| Language | Status | Spec Version | | ----------------------------------------------------- | ------------- | ------------ | | Go | ✓ Implemented | v0.3 | | SQL | ✓ Implemented | v0.2 | | TypeScript | ✓ Implemented | v0.3 |

Community Provided Implementations

| Language | Author | Spec Version | | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | C# (.Net) | @TenCoKaciStromy | v0.2 on 2023-06-30 | | C# (.Net Standard 2.1) | @cbuctok | v0.2 on 2023-07-03 | | C# (.NET) | @firenero | v0.3 on 2024-04-15 | | Dart | @mistermoe @tbd54566975 | v0.3 on 2024-07-02 | | Elixir | @sloanelybutsurely | v0.3 on 2024-04-22 | | Elixir | @xinz | v0.1 on 2024-06-03 | | Erlang | @eproxus | v0.3 on 2024-09-25 | | Gleam | @okkdev | v0.3 on 2025-07-09 | | Haskell | @MMZK1526 | v0.3 on 2024-04-19 | | Java | @fxlae | v0.3 on 2024-04-14 | | Java | @softprops | v0.2 on 2023-07-04 | | Kotlin | @aleris | v0.3 on 2024-05-18 | | Lua | @pushcx | v0.3 on 2025-05-21 | | OCaml | @titouancreach | v0.3 on 2024-04-22 | | PHP | @BaseCodeOy | v0.3 on 2024-12-06 | | Postgres | @blitss | v0.3 on 2024-06-24 | | Python | @akhundMurad | v0.3 on 2024-04-19 | | Ruby | @broothie | v0.3 on 2024-04-13 | | Rust | @conradludgate | v0.3 on 2024-04-12 | | Rust | @johnnynotsolucky | v0.3 on 2024-05-17 | | Rust | @Govcraft | v0.3 on 2024-07-15 | | Scala | @ant8e | v0.3 on 2024-04-19 | | Scala | @guizmaii | Not validated yet | | Swift | [@Frizlab](

View on GitHub
GitHub Stars3.6k
CategoryDevelopment
Updated14h ago
Forks52

Languages

Go

Security Score

100/100

Audited on Apr 1, 2026

No findings