hashids
Implements the hashids algorithm in python. For more information, visit http://hashids.org/
Decision gist · record as of 2026-08-14
Yes, if you need reversible integer-to-hash encoding for ID obfuscation in web URLs or APIs and are comfortable with an abandoned but stable codebase. The package has no dependencies, installs easily, and works reliably on current Python versions. Install only if you do not expect future maintenance or updates; for new projects requiring active support or enhanced security properties, consider whether a maintained alternative better fits your risk tolerance.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with no runtime dependencies.
- However, the package is abandoned—last release was 2020-07-26.
- It remains compatible with current Python versions but will not receive updates for new issues or language changes.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), allowing use in open source and commercial projects without restriction. No notable licensing constraints.
last release 2020-07-26 (2210 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,623,201 downloads/mo, #2,965 on PyPI
Alternatives
Verify before relying
pip install hashids
from hashids import Hashids
hashids = Hashids()
hashid = hashids.encode(123) # Returns 'Mj3'
ints = hashids.decode('Mj3') # Returns (123,)- Whether the package's obfuscation properties remain adequate for current security expectations or threat models.
- Whether abandonment affects compatibility with Python versions released after 3.8.
- How long the package has been without updates and whether that impacts production use.
What it is and what it does
Hashids is a Python port of the JavaScript hashids library that converts integers into short, unique, non-sequential hashes suitable for embedding in URLs and user-facing contexts. It encodes one or many numbers into a hash string and decodes them back to the original integers, making it useful for hiding database IDs from end users while maintaining reversibility. The library supports customization through salt strings (for uniqueness), minimum hash length (for padding), and custom alphabets, and it deliberately avoids generating common English curse words.
The package has no external runtime dependencies and installs with low friction. It is tested against Python 2.7 and 3.5–3.8, though the project is now abandoned and has not been updated since its latest release. For most use cases involving ID obfuscation in web applications, it remains functional and stable, but you should be aware that no new features or compatibility updates will be released.
Use it for
- Hide sequential database IDs in REST API URLs by encoding them as short hashes that decode back to the original ID.
- Generate obfuscated short codes for sharing links or resources without exposing the underlying numeric ID.
- Encode multiple related IDs into a single hash for compact URL parameters or API responses.
- Customize hash appearance with a salt to prevent third parties from easily predicting or decoding your ID scheme.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need reversible integer-to-hash encoding for ID obfuscation in web URLs or APIs and are comfortable with an abandoned but stable codebase.
The package has no dependencies, installs easily, and works reliably on current Python versions. Install only if you do not expect future maintenance or updates; for new projects requiring active support or enhanced security properties, consider whether a maintained alternative better fits your risk tolerance.
Install
hashids on PyPI
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2020-07-26. It remains compatible with current Python versions but will not receive updates for new issues or language changes.
License in practice
Licensed under MIT (permissive), allowing use in open source and commercial projects without restriction. No notable licensing constraints.
Quickstart
pip install hashids
from hashids import Hashids
hashids = Hashids()
hashid = hashids.encode(123) # Returns 'Mj3'
ints = hashids.decode('Mj3') # Returns (123,)
Verify before relying
- Whether the package's obfuscation properties remain adequate for current security expectations or threat models.
- Whether abandonment affects compatibility with Python versions released after 3.8.
- How long the package has been without updates and whether that impacts production use.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=2.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 2,210 days since the last release |
| First released | |
| Downloads | 2,623,201 / month, #2,965 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8 |
Evidence: hashids-1.3.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “encode integers to short hashes”
- hashidsGenerates short, unique, non-sequential hashes from integers,…
- pybase62Encodes and decodes integers and byte sequences to and from base62…
- blurhash-pythonEncodes images into BlurHash strings, compact perceptual hashes that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also django-hashids · sqids · django-hashid-field · django-sqids · shortuuid · pyarmor · nanoid · blurhash · pyarmor.cli.core.alpine · pyarmor.cli.core.linux