--- id: demoji version: "2.0.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # demoji — Accurately remove and replace emojis in text strings License: permissive · Maintenance: active · Downloads: 338.2K/mo ## What it is and what it does demoji is a text-processing library that accurately identifies and manipulates emojis in strings. It bundles Unicode Consortium emoji data at install time, so it works offline and requires no network access at runtime. The package handles complex emoji sequences—like skin-tone modifiers, zero-width joiners, and flag combinations—by sorting emoji codes by length and using a greedy regex approach to match longer sequences before shorter ones. You can use it to find all emojis in a string and get their descriptions, extract emojis as a list, replace them with plain text, or convert them to colon-delimited codes (like `:fire:` for 🔥). It also provides a command-line interface for batch processing files or stdin. The library is typed, actively maintained, and supports modern Python versions. Use it for: - Clean user-generated content (tweets, comments, chat) by replacing emojis with text descriptions for downstream NLP or storage. - Extract and catalog emojis from social media feeds or message logs to understand sentiment or trending symbols. - Convert emoji-heavy text to plain ASCII for systems that don't render emoji or for accessibility. - Validate or audit text fields in forms or databases to detect and flag emoji usage. - Build emoji-aware text search or indexing by mapping emojis to their semantic descriptions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. demoji finds and removes emojis from text, mapping each emoji to its Unicode description or replacing it with a plain-text equivalent. Yes. demoji is lightweight, dependency-free, actively maintained, and solves a real problem with high accuracy. It handles edge cases (multi-character sequences, skin tones, flags) correctly and works offline. Use it whenever you need to find, extract, or normalize emojis in text. ## Install pip install demoji uv add demoji poetry add demoji ## Installing demoji Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained, last commit 2026-07-12, with Unicode emoji data bundled at install time so no network calls are needed at runtime. License in practice: Apache-2.0 is permissive; you can use demoji freely in commercial and private projects with minimal restrictions. Quickstart: pip install demoji import demoji text = "Great game! 🔥 🎉" print(demoji.findall(text)) # {'🔥': 'fire', '🎉': 'party popper'} print(demoji.replace_with_desc(text)) # Great game! :fire: :party popper: Requires Python 3.10 or later (supports 3.10–3.14). Verify before relying: - Whether the bundled Unicode emoji data (version 16.0) can be updated independently of package releases. - Performance characteristics when processing very large text blobs or documents with thousands of emojis. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 338.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags emoji detection and removal, find emojis in text, replace emojis with text, emoji to description mapping, unicode emoji handling, emoji text processing, strip emojis from strings, emoji-processing, text-normalization, unicode [View on SkillFed](https://skillfed.io/packages/demoji) · [View on PyPI](https://pypi.org/project/demoji/)