unicode-slugify
A slug generator that turns strings into unicode slugs.
What it is and what it does
Unicode Slugify generates URL-safe slugs from strings while handling unicode characters intelligently. Unlike simple transliteration libraries, it was built to preserve unicode in slugs when appropriate (e.g., 'Bäng' stays 'bäng') or transliterate to ASCII on demand (e.g., '北京' becomes 'bei-jing'). It offers fine-grained control: you can keep or strip case, replace spaces with custom characters, and whitelist additional allowed characters for formats like snake_case or CamelCase.
The package depends on unidecode for transliteration and six for Python 2/3 compatibility. It installs with low friction as a pure Python wheel. Maintenance is dormant, but the library is simple, stable, and carries no known vulnerabilities. It remains suitable for projects that need slug generation with unicode awareness, particularly web applications handling international content.
Use it for:
- Generate URL slugs for blog posts or product names containing accented characters or non-Latin scripts.
- Convert user-provided strings to ASCII-only slugs for systems that require it (e.g., legacy APIs or databases).
- Create snake_case or CamelCase identifiers from natural-language input with unicode support.
- Build URL-friendly identifiers for marketplaces with international content.
- Normalize unicode strings into consistent slug formats for deduplication or routing in web applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts strings into URL-friendly slugs while preserving unicode characters, with options to transliterate non-ASCII, adjust case, and customize allowed characters.
Yes, if you need unicode-aware slug generation. The package is lightweight, stable, and carries no security vulnerabilities. Dormant maintenance is not a blocker for a simple, focused tool—the code is unlikely to need updates. Install it when transliteration control and unicode preservation matter; skip it if you only need ASCII slugs or can use a more actively maintained alternative.
Install
unicode-slugify on PyPI
pip
pip install unicode-slugifyuv
uv add unicode-slugifypoetry
poetry add unicode-slugifyInstalling unicode-slugify
Before you install
Low friction: pure Python wheel with only two lightweight dependencies (six and unidecode). Maintenance is dormant—last release was 2021-10-20—but the codebase is stable and shows no active development pressure.
License in practice
BSD permissive license imposes no significant restrictions; you may use, modify, and distribute the package freely in commercial or open-source projects.
Quickstart
pip install unicode-slugify
from slugify import slugify
slugify(u'Bän...g (bang)')
# u'bäng-bang'
slugify(u'北京 (capital of China)', only_ascii=True)
# u'bei-jing-capital-of-china'
Verify before relying
- Current compatibility with Python versions beyond 3.3 (classifiers list Python 3.3 but requires_python is unspecified)
- Whether dormant maintenance since 2021-10-20 poses any practical risk for modern Python environments
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — six, unidecode |
| Maintenance | dormant — 1,759 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,547/month — #14,434 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: unicode_slugify-0.1.5-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
python-slugifyConverts text strings—including unicode, HTML…
permissive · top 1,000 on PyPI
python-string-utilsProvides functions to validate, manipulate, and…
permissive · top 15,000 on PyPI
slugifyConverts text strings into URL-safe slugs by…
unclear · top 15,000 on PyPI
django-autoslugProvides a Django model field that…
copyleft · top 15,000 on PyPI
clean-textPreprocesses and normalizes user-generated text…
permissive · top 15,000 on PyPI
UnidecodeConverts Unicode text to ASCII-safe…
copyleft · top 1,000 on PyPI
normalityNormality removes diacritics, punctuation, and…
permissive · top 15,000 on PyPI
anyasciiConverts Unicode text to ASCII-only equivalents…
permissive · top 5,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
random-slugsGenerates random word-based slugs with…
unclear · top 15,000 on PyPI