skillfed

unicode-slugify

A slug generator that turns strings into unicode slugs.

unicode-slugify v0.1.5 78.5K downloads/30d#14,434 on PyPI325
Permissive license BSD DORMANT released

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

uv

uv add unicode-slugify

poetry

poetry add unicode-slugify

Installing 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

Development Status :: 4 - BetaEnvironment :: Web EnvironmentEnvironment :: Web Environment :: MozillaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.3Topic :: Software Development :: Libraries :: Python Modules

Tags

unicode slug generatorurl slug from unicode texttransliterate strings to slugsunicode to ascii slugslug with unicode supporturl-safe string convertertext to slug with unicode
url-slug-generationunicode-handlingtext-normalization

More Python Modules packages