Hashids
Keep, but not for new work. 9th of 9 ID generators.
Hashids turns integers into short, YouTube-like strings that can be decoded back. It is small and stable. Its own authors have replaced it with Sqids, and the package has had no release since May 2023. Keep it where it already runs, but start new work with Sqids, or with Nano ID if you don't need to decode IDs.
Best for: Existing projects that already store or publish Hashids-encoded IDs and need them to keep decoding.
Scores
Overall4.1
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
It is a working, safe, zero-dependency tool, but its own authors replaced it with Sqids, which does the same job better. With no release since 2023 and a below-median growth ratio, it belongs in the 'keep where it runs' band. For new work, use Sqids for reversible IDs, or Nano ID or uuid for random ones.
- sqids.org/faq: Successor with fixes; IDs not compatible
- npm latestPublishedAt: No release since May 2023
- medianDownloadsRatio: About 3.0x vs the 4.1x median
GPT-6.2 Sol: 4.2, likely 3.3 to 5.4
Keep Hashids where published links depend on its exact encoding. For new projects, Sqids offers a profanity blocklist for reversible IDs from ordinary integers, and Nano ID is a stronger choice for generating fresh short IDs. Sparse maintenance and below-benchmark download growth weigh against choosing Hashids today, while BigInt support gives it a place in some new projects.
- sqids.org/faq: Sqids adds a configurable blocklist and produces different IDs from Hashids.
- github.com/ai/nanoid: Nano ID generates short random IDs independently of database keys.
- github.com/sqids/sqids-javascript/blob/main/src/sqids.ts: Sqids for JavaScript limits inputs to JavaScript's maximum safe integer.
- github.com/niieani/hashids.js/releases/tag/2.3.0: The May 2023 release supports parsing large integer strings as BigInt.
- github.commitsLastYear, npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: Two commits in a year, with download growth below the catalog median.
Needed by many3.3
How many developers need a tool for this job?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
Its job is narrower than the category's. It encodes integers into reversible short strings, mostly to hide sequential database IDs in URLs. Most projects that need IDs just want random or time-ordered ones, which uuid or Nano ID provide.
- github description: Generates YouTube-like IDs from numbers
- hayageek.com/nodejs-hashids-tutorial-example: Tutorial on using it to encode database integers
GPT-6.2 Sol: 3.6, likely 2.5 to 4.9
Hashids fits applications that already have numeric or hexadecimal keys and want shorter public links. It works in browsers and Node.js, but every ID needs an existing value to encode. The share of projects that need reversible IDs is hard to estimate from the available evidence.
- github.com/niieani/hashids.js: Documents runtime support and reversible integer and hex encoding.
- reddit.com/r/PostgreSQL/comments/1ev1011/best_approach_to_get_short_ids_from_uuids: A developer reports using Hashids to expose compact 64-bit integer IDs.
Helps a lot5.9
How well does it do the job for those who need it?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It works well for its job, with types, ESM and CJS builds, and zero dependencies. Sqids does the same job better: it has a custom blocklist, shorter IDs and no misleading salt. AI agents write correct code for its simple API.
- sqids.org/faq: Sqids FAQ lists the Hashids flaws that Sqids fixes
- github.com/niieani/hashids.js: README documents ESM and CJS usage
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 6.7, likely 5.5 to 7.8
Version 2.3.0 has a small, documented API with TypeScript declarations, support for BigInt, and configurable padding. The examples are easy to follow, but invalid input needs explicit handling, and a fix for negative BigInt inputs is still open. An external Node.js benchmark found lower throughput than Nano ID, though the two libraries do different work.
- github.com/niieani/hashids.js: Documents usage, configuration, and invalid-input behavior.
- app.unpkg.com/hashids@2.3.0/files/esm/hashids.d.ts: Published types cover numeric strings, BigInt, and hex helpers.
- github.com/niieani/hashids.js/pull/593: An open contribution documents inconsistent handling of negative BigInt inputs.
- github.com/mcollina/hyperid: A competing library's Node.js benchmark measures Hashids below Nano ID on different workloads.
Holds up over time3.1
Will it still be a good choice in two years?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
The last release was in May 2023, with two commits and no releases in the last year. The Scorecard 'Maintained' check scores 0. Its authors upgraded and rebranded it as Sqids, so the ecosystem is moving away from it. It is not deprecated, and its feature set is complete, which limits the risk.
- npm latestPublishedAt: Last release 2023-05-24
- github commitsLastYear: 2 commits in the last year
- github.com/Hashids: Hashids org says it was upgraded and rebranded to Sqids
- sqids.org/faq: Sqids is the successor; the IDs are not compatible
GPT-6.2 Sol: 3.1, likely 2.0 to 4.4
Hashids had two commits in the past year, and its last release was in May 2023. A proposed fix has been open since June 2026, and the maintainers direct new projects to Sqids. The dependency-free package can keep working as it stands, but future fixes and release ownership are uncertain.
- github.commitsLastYear, github.releasesLastYear, npm.dependencies: Two commits, zero releases in the last year, and zero runtime dependencies.
- github.com/niieani/hashids.js/releases: Lists 2.3.0 from May 2023 as the latest release.
- github.com/niieani/hashids.js/pull/593: The June 2026 input-handling fix remains open.
- github.com/hashids: The maintainers recommend Sqids for projects without existing Hashids.
Used widely4.5
How many use it, and is that growing?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It has 3.3M downloads per 4 weeks and 6,496 dependent repos, more than Sqids, uuidv7 or TypeID by dependents. Its download ratio is about 3.0x, below the 4.1x median, so it is losing ground. Meanwhile Sqids grew about 40x from a small base, so new choices are shifting to the successor.
- npm downloadsLast4Weeks: 3.35M now vs 1.11M a year ago, ratio about 3.0
- dependents.repos: 6,496 dependent repos
- peers Sqids downloads: Successor grew from 0.48M to 19.3M
GPT-6.2 Sol: 4.0, likely 3.0 to 5.2
The collector found about 6,500 dependent repositories and 312 dependent npm packages, well below Nano ID and uuid. Four-week downloads grew from 1.11 million to 3.35 million, but that 3.02× increase trails the 4.1× catalog benchmark. Repeat installs and incomplete repository coverage leave the number of direct choices uncertain.
- dependents.repos, dependents.packages: The collector found 6,496 repositories and 312 packages.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads rose 3.02× against the catalog median of 4.1×.
- peers.dependentRepos: Hashids trails ULID and is far below Nano ID and uuid in tracked repository use.
Vouched for3.7
Who stands behind it being good?
Claude Opus 5.5: 3.0, likely 2.0 to 5.0
Its long history and ports to many languages show broad past adoption. I found no current independent benchmarks, survey data or named production users, and no Hacker News or Bluesky attention. Its own authors now recommend Sqids, which counts against it.
- hackerNews.stories: No matching stories
- bluesky.posts: No posts
- sqids.org/faq: Authors present Sqids as the upgrade
GPT-6.2 Sol: 4.4, likely 3.0 to 5.7
OWASP Juice Shop still lists Hashids 2.3.0, and a developer documented adapting the JavaScript implementation to work with their public IDs in BigQuery. Trifacta's license notices show historical commercial inclusion. Recent production reports and survey satisfaction data are scarce, leaving a wide range.
- github.com/juice-shop/juice-shop/blob/master/package.json: OWASP Juice Shop lists Hashids 2.3.0 as a direct dependency.
- github.com/orgs/sqids/discussions/21: A user describes adapting Hashids.js for public IDs in their BigQuery workflow.
- help.alteryx.com/pdf/general/TrifactaOpenSourceSoftwareLicenses.pdf: Trifacta's historical notices list Hashids.js 2.2.1.
- 2025.stateofjs.com/en-US/other-tools: The survey's tooling results provide no Hashids satisfaction measure.
Safe6.8
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has zero dependencies, no advisories ever and an MIT licence, so the attack surface is small. The Scorecard score is low (3.3), with no code review, unpinned dependencies and no security policy. Its main risk is misuse: users may treat the salt as protection, but anyone can decode the IDs.
- advisories.total: No advisories
- npm dependencies: Zero dependencies
- scorecard.score: 3.3, with weak code-review and maintenance checks
- cdn.jsdelivr.net/gh/niieani/hashids.js@master/README.md: README warns it is not encryption
GPT-6.2 Sol: 6.6, likely 5.3 to 7.9
The MIT license and zero runtime dependencies keep the dependency risk relatively small, and OSV lists zero advisories. The OpenSSF score of 3.3 reflects weak code review, workflow permissions, dependency pinning, and security reporting practices. GitHub Actions created the latest GitHub release, while current npm publishing controls and the number of authorized publishers remain unverified.
- npm.license, npm.dependencies, advisories.total: MIT license, zero runtime dependencies, and zero OSV advisories.
- scorecard.score, scorecard.checks: Score of 3.3, with zeroes for code review, token permissions, dependency pinning, and security policy.
- github.com/niieani/hashids.js/releases/tag/2.3.0: GitHub Actions created the latest GitHub release.
Good
- It has no dependencies, ships TypeScript types and supports both ESM and CommonJS.
- Encoding and decoding are deterministic, so you can hide sequential database IDs without adding a column.
- It is mature and has a long, clean security record with no published advisories.
- Ports exist for many languages, so a backend in another language can decode the same IDs.
Bad
- Its authors replaced it with Sqids, and Sqids IDs are not compatible with Hashids IDs.
- There has been no npm release since 2.3.0 in May 2023, and only two commits in the last year.
- The 'salt' option looks like security but gives none: these IDs are obfuscation, not encryption.
- Its profanity filter is fixed, unlike the custom blocklist in Sqids, and its reserved characters make IDs longer.
The numbers
- npm downloads, 4 weeks
- 3.3M ×3.0 in a year
- GitHub stars
- 4.3k
- Commits, 12 months
- 2
- npm version
- 2.3.0 May 2023
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 3.3 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (niieani/hashids.js), npm (hashids), OSV and the OpenSSF Scorecard.