Skip to content
@hashids

Hashids

Generate short, unique, non-sequential ids from numbers.

Hashids → Sqids ✨

tl&dr: Hashids has been upgraded & rebranded to Sqids.

Hashids is a small library that generates short unique IDs from numbers. By now, it supports implementations in many different programming languages. It has served the community well over the last few years & we believe we can improve it in a few ways:

What has changed?

  1. Repos are now hosted in one place. That way it's easier to maintain & update code (existing repos stay where they are).
  2. Consistent output. All supported programming languages produce the same IDs.
  3. Simpler algorithm. The new algorithm produces better randomized IDs, while keeping implementation simple.
  4. Simplified API. Only encode and decode functions w/ clear indication for the largest supported unsigned integer.
  5. No more salt. Support for custom IDs is now done by providing a manually shuffled alphabet. This is an optional step.
  6. Profanity blocklist. Support for blocking specific words from appearing in generated IDs. Libraries come with a basic default blocklist for several languages.
  7. Clear goals & examples. More defined use-cases that emphasize what this library is good for (and not good for).
  8. New name. No association with hashes anymore + shorter name.
  9. Updated website. Now includes use-cases, playground, easier repo filtering, FAQs & features.
  10. Sponsor support. To ensure that the project can be sustained for years to come.

What is happening with existing repos?

Nothing. Existing implementations stay where they are. They have plenty of on-going usage & the new website links to them as well.

Is the new algorithm a drop-in replacement for Hashids?

No. Sqids produces different IDs. We advise to use it only on new projects or if you are not using any pre-generated IDs.

Has every existing language been upgraded to the new algorithm?

No. Upgrading repos is an on-going process. You can see the progress here. You can also help by contributing.

When can I start using Sqids?

Now. Most implementations have already been published.

Where can I find more info?

Sqids website is a good starting place.

Pinned Loading

  1. hashids.github.io hashids.github.io Public archive

    This is the old Hashids website. It is no longer maintained and has migrated over to Sqids.

    HTML 206 34

Repositories

Showing 2 of 2 repositories
  • .github Public

    This is Hashids organization profile page

    hashids/.github’s past year of commit activity
    0 Apache-2.0 0 0 0 Updated Dec 30, 2023
  • hashids.github.io Public archive

    This is the old Hashids website. It is no longer maintained and has migrated over to Sqids.

    hashids/hashids.github.io’s past year of commit activity
    HTML 206 34 0 0 Updated Jul 27, 2023

Top languages

Loading…

Most used topics

Loading…