skillfed

confusables

A python package providing functionality for matching words that can be confused for eachother, but contain different characters

confusables v1.2.0 567.3K downloads/30d#5,969 on PyPI64
Permissive license DORMANT released

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 confusables

uv

uv add confusables

poetry

poetry add confusables

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

unicode homograph detectionconfusable character matchinglookalike text normalizationhomoglyph finderunicode security analysischaracter confusion detectionfake domain detection
unicode-securitytext-normalizationhomograph-detection

More Linguistic packages