confusables
A python package providing functionality for matching words that can be confused for eachother, but contain different characters
What it is and what it does
Confusables is a text analysis library that identifies and matches words that look the same to humans but are spelled with different Unicode characters. It leverages the official Unicode confusables list to detect homographs—characters that resemble each other across different scripts and symbol sets (e.g., Latin 'o' vs. Cyrillic 'о'). The package provides four main functions: `is_confusable()` to test if two strings are visually similar, `confusable_characters()` to list all characters that resemble a given character, `confusable_regex()` to generate patterns matching confusable variants, and `normalize()` to convert confusable characters back to ASCII equivalents.
It's designed for security and text-processing scenarios where detecting character substitution matters: finding malicious domain names that mimic legitimate ones, normalizing user input to prevent filter evasion, or analyzing text data where character variation is a concern. The package has no external dependencies and installs as a pure Python wheel, making it lightweight and portable.
Use it for:
- Detect homograph attacks: identify fake domain names or usernames that use lookalike Unicode characters to impersonate legitimate ones.
- Normalize user-generated text: convert confusable characters to their ASCII equivalents for consistent storage or comparison.
- Bypass-attempt detection: find attempts to circumvent profanity filters or content policies by substituting visually similar characters.
- Text data cleaning: standardize international or mixed-script input to a canonical form for analysis or indexing.
- Security auditing: scan for domain registrations or usernames that could confuse users through visual similarity.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects and matches words that appear identical but use different Unicode characters, useful for finding homograph attacks, normalizing text, or bypassing character-based filters.
Yes, if you need homograph detection or character normalization for security or text processing. The package is lightweight, dependency-free, and stable for its core use case. However, maintenance is dormant (last release 2021-03-24), so expect no updates; verify that Unicode version 8.0.0 is current enough for your threat model or data requirements before relying on it for security-critical applications.
Install
confusables on PyPI
pip
pip install confusablesuv
uv add confusablespoetry
poetry add confusablesInstalling confusables
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant—last release was 2021-03-24 and last commit 2023-11-11—so expect no active bug fixes or updates, though the package remains stable for its core use case.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install confusables
from confusables import is_confusable
print(is_confusable('rover', 'Ʀỏ𝕍3ℛ')) # True
Verify before relying
- Whether the Unicode confusables data (version 8.0.0) is current enough for modern security or text-processing use cases.
- Performance characteristics when processing large volumes of text or checking many character combinations.
- Compatibility with Python versions beyond 3 (requires_python is unspecified in the fact sheet).
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,969 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 567,316/month — #5,969 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: confusables-1.2.0-py3-none-any.whl
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
confusable-homoglyphsDetects Unicode homoglyphs and mixed-script…
permissive · top 5,000 on PyPI
matchMaps tokenized words and phrases back to their…
permissive · top 5,000 on PyPI
normalityNormality removes diacritics, punctuation, and…
permissive · top 15,000 on PyPI
graphemeuProvides string manipulation functions that…
permissive · top 5,000 on PyPI
graphemeProvides string manipulation functions that…
permissive · top 5,000 on PyPI
anyasciiConverts Unicode text to ASCII-only equivalents…
permissive · top 5,000 on PyPI
pyunormalizeProvides Unicode normalization (NFC, NFD, NFKC,…
permissive · top 5,000 on PyPI
UnidecodeConverts Unicode text to ASCII-safe…
copyleft · top 1,000 on PyPI
unicode-segmentation-rsProvides Unicode text segmentation (graphemes,…
unclear · top 15,000 on PyPI
better-profanityDetects and censors profanity in text,…
permissive · top 5,000 on PyPI