Emoji Cleaner
Emoji Cleaner is a Visual Studio Code extension that removes all emojis from your project files — safely.
If you're tired of seeing random smileys, flags, invisible Unicode gremlins, or AI-generated emoji artifacts inside your code, this extension cleans them up without breaking your files.
No emojis. No corruption. No stress.
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
- Changelog
- Contributing
- License
Features
- Safely remove Unicode emojis from your entire workspace
- Safe JSON cleaning — prevents corruption in
package.json, configs, etc.
- Supports complex emoji sequences (flags, skin tones, ZWJ emojis)
- Skips binaries and respects excluded folders
- Supports custom file extensions
- Output logs for transparency
- “Dry run” mode for previewing changes
- Fast, lightweight, and stable
Installation
From Marketplace
- Open VS Code
- Go to the Extensions panel
- Search for Emoji Cleaner
- Install it
From .vsix
code --install-extension emoji-cleaner-0.1.8.vsix
Usage
- Open a workspace in VS Code
- Press
Ctrl + Shift + P (Windows/Linux)
or Cmd + Shift + P (Mac)
- Run:
Remove All Emojis From Project
- The extension scans all supported files
- A summary notification appears when finished
Tip: Always use version control or keep backups before mass-cleaning.
How It Works
Emoji Cleaner performs the following steps:
- Recursively searches the workspace for supported file types
- Applies ignore rules for folders/files you exclude
- Reads each file
- If JSON → parses it safely, sanitizing both keys and values
- If text → applies the emoji regex
- Writes updated content only if changes exist
Emoji Regex Used (Safe Version)
const EMOJI_REGEX =
/(\p{Extended_Pictographic}|\p{Emoji_Presentation}|[\u{1F1E6}-\u{1F1FF}])+/gu;
Explanation
\p{Extended_Pictographic} → matches visible emoji characters
\p{Emoji_Presentation} → emoji-presenting characters
\u{1F1E6}-\u{1F1FF} → regional flag indicators
- Works without stripping unrelated characters
- Prevents corruption often caused by overly broad emoji regex patterns
This ensures only actual emojis are removed — no false positives.
Supported File Types
- JavaScript / TypeScript →
.js, .ts, .jsx, .tsx
- JSON →
.json (fully safe mode)
- HTML / CSS →
.html, .css
- Markdown / Text →
.md, .txt
- YAML →
.yml, .yaml
You can customize the list in VS Code settings.
Changelog
v0.1.7 — Major Stability Update
- Added JSON-safe cleaning
- Added ignore patterns (e.g.,
node_modules, .git, dist)
- Added custom file extension support
- Added dry-run mode
- Added detailed logs via Output Channel
- Fixed file traversal logic
- Improved emoji regex (no unwanted character removals)
- Fixed regex over-matching issues
- Updated README + extension metadata
Contributing
Contributions are welcome!
You can:
- Report bugs
- Suggest features
- Submit pull requests
Please follow standard GitHub workflows and include descriptions for clarity.
License
This project is licensed under the MIT License.
See LICENSE.md for details.