# bwmarrin/snowflake

A simple to use Go (golang) package to generate or parse Twitter snowflake IDs

Repository: https://github.com/bwmarrin/snowflake
Canonical: https://ross.abutalabs.com/products/bwmarrin-snowflake
Language: Go
License: BSD-2-Clause
License Family: permissive
Topics: snowflake, golang, go
Last push: 2024-07-25T16:28:11+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3752, "days_push": 769, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3349, forks 394 (observed 2026-08-28T04:07:57.790274+00:00)

## What it is
A Go package for generating and parsing Twitter snowflake IDs, 63-bit integers encoding timestamp, node ID, and sequence number. It supports custom bit layouts and epochs, JSON marshaling, and monotonic clock protection against drift.

## Use cases
- generate unique distributed ids in go
- parse twitter snowflake ids
- generate sortable unique ids for database keys
- use snowflake ids in a json api
- generate ids across multiple nodes without coordination

## When to avoid
- you need UUIDs or non-numeric identifiers
- you need IDs with embedded randomness rather than timestamps
- your project is not in Go

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: databases, microservices, developer-tools
- platform: go, cross-platform
- tags: snowflake-ids, unique-id-generation, twitter-snowflake, id-parsing

## Member repositories
- bwmarrin/snowflake (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:57.790274+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:40:58.845748+00:00, confidence not recorded.
  - readme: https://github.com/bwmarrin/snowflake (fetched 2026-08-28T04:07:57.790274+00:00, sha ed579e38f614)
- Data as of 2026-08-30T08:39:29.467469+00:00.
