Emoji Cleaner
Emoji Cleaner is a Visual Studio Code extension that removes all emojis from your project files. If you are tired of sneaky smileys, hearts, or any Unicode mischief scattered in your code, this extension is for you. No emojis allowed, pun intended.
Repository
You can find the full source code, issues, and contribution guidelines here:
Repository: https://github.com/Cybugg/Emoji-Remover-VS-Code
Table of Contents
- Features
- Installation
- Usage
- How It Works
- Supported File Types
- Contributing
- License
Features
- Remove all Unicode emojis from your entire workspace.
- Works recursively on all files in your project.
- Supports complex emoji sequences, including flags, skin tones, and joined emojis.
- Only processes text-based files to avoid corrupting binaries.
- Fast, lightweight, and easy to use.
Installation
- Open VS Code.
- Go to the Extensions panel.
- Search for
Emoji Cleaner and install it.
- Alternatively, if you have the
.vsix file:
code --install-extension emoji-cleaner-0.1.0.vsix
Usage
- Open a workspace or project in VS Code.
- Press
Ctrl + Shift + P (or Cmd + Shift + P on Mac).
- Run the command: Remove All Emojis From Project.
- The extension will scan all files and remove any emojis it finds.
- Once finished, a notification will appear confirming the operation.
Note: Always keep a backup or use version control. Deleted emojis are not recoverable.
- The extension scans all files in the workspace and removes emojis.
- Works efficiently on small and medium projects.
- For very large projects, consider excluding folders like
node_modules for faster execution.
How It Works
The extension scans all files in your workspace and performs the following steps:
- Recursively traverses all directories starting from the workspace root.
- Filters files to only include supported text-based formats.
- Reads each file’s content.
- Applies a Unicode-aware regular expression to remove emojis:
/[\p{Emoji_Presentation}\p{Emoji}\u200d]+/gu
Explanation of the Regex
\p{Emoji} – Matches all Unicode-defined emojis.
\p{Emoji_Presentation} – Matches characters that are displayed as emojis by default.
\u200d – Zero-Width Joiner, used in composite emoji sequences.
+ – Matches one or more consecutive emoji-related characters.
g – Global flag, replaces all occurrences in the text.
u – Unicode mode, required for \p{...} support.
The extension then writes the cleaned content back to each file and displays a notification once the process is complete.
Supported File Types
The extension processes the following text-based file types:
- JavaScript / TypeScript:
.js, .ts, .tsx, .jsx
- JSON:
.json
- HTML / CSS:
.html, .css
- Markdown / Text:
.md, .txt
- YAML:
.yml, .yaml
Additional file types can be added by modifying the extension code or configuration.
Contributing
Contributions are welcome. You may:
- Report bugs
- Suggest new features
- Submit pull requests
Please follow standard GitHub workflow and include detailed descriptions in your pull requests.