
name-to-gender is a zero-dependency TypeScript library that guesses gender from a first name using all-time US Social Security birth data. It returns a probability and the raw counts behind it, so you decide the threshold.
The existing packages used data from a decade ago, shipped without types, and got common names wrong.
Timeline
June 24, 2026
Built and published
Aggregated 91,320 names from the Social Security Administration's yearly files with a reproducible build script, wrapped them in a typed API with ESM and CommonJS builds, and published 1.0.0 the next day.
- guessGender returns gender, probability, counts, and the normalized name
- A minimum probability option folds unisex names into unknown
- Accent folding, punctuation stripping, hyphenated fallback
- Fully offline, no runtime dependencies
June 26, 2026
Written for search
A README with a comparison table against the four competing packages, an FAQ, and use cases, plus tests that lock in the names those packages mislabel.
Summer 2026
In production
ChatPEP uses it to segment marketing contacts by inferred gender.
August 2026
Maintenance
Moved to pnpm, refreshed dependencies, and released 1.0.2.
Impact
- Over 700 downloads in its first three months.
- In production inside ChatPEP's contact sync.
- Releases publish themselves with npm provenance when the version changes.
My role
Sole author and maintainer: the dataset pipeline, the library, tests, CI, and the README.
- TypeScript
- npm