skorokithakis

shortuuid: Generate Concise, URL-Safe UUIDs

shortuuid is a Python library built on Python’s uuid module that encodes UUIDs as concise, URL-safe strings using an unambiguous base57 alphabet. It also supports custom alphabets, deterministic version 5 UUIDs, and Django fields.

MaintainedPythonBSD-3-ClauseLibraryDeveloper ToolsUuid
Stars
2.2k
Forks
121
Stars, last 30 days
+0
Last commit
15 days ago
Contributors
38

Our take

Maintaineda few commits in the last 90 days

Health score

38/100

How it is scored
Activity
29
Community
55
Issues
21
Pull requests
46

+0 stars in the last 30 days

shortuuid is a focused Python utility with recent maintenance activity and broad contributor participation, though its latest published release is old.

Good fit if

  • You want readable, URL-safe UUID strings in a Python project and value the included encode/decode support.
  • You use Django and want a UUID-based string field with configurable length and alphabet.
  • You are comfortable adopting a BSD-3-Clause library with recent commits, but no release in several years.

Look elsewhere if

  • Your project does not use Python or needs a non-Python implementation as its primary integration.
  • You require a recently published release as a condition of adoption.
  • Your identifiers must remain universally unique after shortening them by truncation, which the README warns is not guaranteed.
All health signals
Last commit2026-10-26 (15 days ago)
Commits, last 90 days2
Releases, last 12 months0 (latest v1.0.0, 2020-03-06)
Contributors38 (top contributor: 69% of commits)
Issues closed, last 90 days0
Pull requests merged, last 90 days2
Project age15 years

Checked on 2026-11-11 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

2,197

Forks

121

Change since Nov 17, 2026: 0 stars·0 forks

Overview

shortuuid is a Python library built on Python’s standard-library uuid module. It translates UUIDs into concise, URL-safe strings with an alphabet that avoids easily confused characters, making non-sequential identifiers easier to share and use in URLs or other user-facing places.

It is intended for Python applications that want compact representations of UUIDs without replacing UUID generation itself. The library can also encode and decode existing UUIDs, create name-based version 5 UUIDs, and provide a Django model field.

Key Features

  • Generate random UUIDs as short strings using an unambiguous base57 alphabet.
  • Encode and decode standard UUID values.
  • Generate deterministic version 5 UUIDs from names.
  • Configure a custom alphabet, with an option to preserve its order.
  • Generate cryptographically secure random strings with os.urandom().
  • Use the ShortUUID class to keep separate alphabet configurations.
  • Generate identifiers from the command line.
  • Use ShortUUIDField in Django models.

Use Cases

  • Python application developers who need user-facing IDs that are shorter and easier to read than standard UUID strings.
  • API developers who want UUID-based identifiers that are convenient to include in URLs.
  • Django teams that want a short UUID string as a model field or primary key.
  • Teams that need compact encodings for existing UUIDs while retaining the ability to decode them.
  • Developers who need repeatable identifiers derived from names, using version 5 UUIDs.

What you need

Detected in the repository

  • Python (from pyproject.toml)
  • Automated checks on GitHub Actions

License in plain words

BSD-3-Clausepermissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the copyright and license notice; the authors' names cannot endorse your product
  • Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install with pip:

pip install shortuuid

Then import the library with import shortuuid. See the README for usage details, configuration options, and Django integration.

Considerations

The README says Python 3.6 or later is required. Shortening an encoded UUID by truncating it reduces its uniqueness guarantees, so choose the full representation when collision avoidance is important. The project has recent commit and pull-request activity, but no release in over a year according to the supplied health data; its latest release dates to 2020. It has contributions from multiple people, and contributor activity is not concentrated in one person. The repository reports CI but no tests in the supplied requirements data. The BSD-3-Clause license permits broad use subject to its terms.

Found this useful?

Share it with someone who would like shortuuid.

Comparisons