anyascii
Unicode to ASCII transliteration
What it is and what it does
AnyAscii is a Unicode-to-ASCII transliteration library that replaces Unicode characters with their closest ASCII equivalents on a character-by-character basis. It uses established romanization systems for different scripts and converts symbolic characters based on their meaning or appearance. All ASCII characters pass through unchanged; unmapped or unknown characters are removed entirely.
The library is lightweight with no external dependencies and supports Python 3.3 and later. It's commonly used for generating URL slugs, normalizing text for search, handling emoji conversion, and preparing multilingual input for ASCII-only systems. The transliteration is deterministic and context-free, making it predictable but not linguistically sophisticated.
Use it for:
- Generate URL-safe slugs from Unicode titles or user input without special characters.
- Normalize multilingual text for systems that only accept ASCII (legacy databases, APIs).
- Convert emoji and symbolic characters to readable ASCII equivalents in text processing pipelines.
- Prepare search queries by removing diacritics and non-ASCII characters for matching.
- Clean user-generated content to prevent encoding issues in downstream systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Unicode text to ASCII-only equivalents by transliterating each character to its best ASCII representation, leaving ASCII input unchanged and removing unmapped characters.
Yes. The package is actively maintained, has no dependencies, installs with low friction, carries no known vulnerabilities, and uses a permissive license. It solves a specific, common problem (Unicode-to-ASCII conversion) reliably. Install if you need straightforward character transliteration; skip if you need context-aware linguistic transformation or language-specific romanization rules.
Install
anyascii on PyPI
pip
pip install anyasciiuv
uv add anyasciipoetry
poetry add anyasciiInstalling anyascii
Before you install
Low install friction with no runtime dependencies. Active maintenance: last commit 2026-06-06, latest release 2025-06-29, 411 days since last release. Repository has 420 stars and is not archived.
License in practice
Licensed under ISC (permissive), which allows commercial and private use with minimal restrictions.
Quickstart
pip install anyascii
from anyascii import anyascii
result = anyascii('άνθρωποι')
assert result == 'anthropoi'
Requires Python 3.3 or later.
Verify before relying
- Whether the character-by-character transliteration approach handles combining marks and multi-character sequences as expected for your use case.
- Performance characteristics when processing large volumes of text or very long strings.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.3) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 411 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,132,757/month — #2,374 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: anyascii-0.3.3-py3-none-any.whl
Keywords: unicode, ascii, transliteration, utf8, romanization, slug, emoji, unidecode, normalization
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
emoji-country-flagConverts between flag emoji and ASCII country…
permissive · top 15,000 on PyPI
fold-to-asciiConverts Unicode characters outside the basic…
permissive · top 15,000 on PyPI
UnidecodeConverts Unicode text to ASCII-safe…
copyleft · top 1,000 on PyPI
emojiConverts between emoji characters and their…
permissive · top 1,000 on PyPI
demojidemoji finds and removes emojis from text,…
permissive · top 15,000 on PyPI
unicode-slugifyConverts strings into URL-friendly slugs while…
permissive · top 15,000 on PyPI
normalityNormality removes diacritics, punctuation, and…
permissive · top 15,000 on PyPI
python-slugifyConverts text strings—including unicode, HTML…
permissive · top 1,000 on PyPI
clean-textPreprocesses and normalizes user-generated text…
permissive · top 15,000 on PyPI