# Hashids: 4.1 out of 10

Keep, but not for new work. 9th of 9 in [ID generators](https://elestia.ai/opensource/ids/index.md).

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

- **Overall: 4.1** (likely 3.2 to 5.2)
  - Claude Opus 5.5 (4.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.
  - GPT-6.2 Sol (4.2): 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.
- **Needed by many: 3.3** (likely 2.3 to 4.5)
  - Claude Opus 5.5 (3.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.
  - GPT-6.2 Sol (3.6): 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.
- **Helps a lot: 5.9** (likely 4.8 to 6.9)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (6.7): 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.
- **Holds up over time: 3.1** (likely 2.0 to 4.2)
  - Claude Opus 5.5 (3.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.
  - GPT-6.2 Sol (3.1): 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.
- **Used widely: 4.5** (likely 3.5 to 5.6)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.0): 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.
- **Vouched for: 3.7** (likely 2.5 to 5.4)
  - Claude Opus 5.5 (3.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.
  - GPT-6.2 Sol (4.4): 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.
- **Safe: 6.8** (likely 5.7 to 8.0)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (6.6): 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.

## 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

- Downloads, 4 weeks: 3.3M
- In a year: ×3.0
- GitHub stars: 4.3k
- Commits, 12 months: 2
- Last npm release: May 2023
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/niieani/hashids.js
- npm: https://www.npmjs.com/package/hashids

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
