Remove Special Characters
Keep only letters, numbers, and whitespace. Strip every punctuation, symbol, and special character. Unicode-aware.
0 characters
0 characters
About Remove Special Characters
This tool keeps only Unicode letters (\p{L}), digits (\p{N}), and whitespace — every other character (punctuation, symbols, emoji, control codes) is removed. The result is a clean, alphanumeric-only version of your input.
When to use it
- Producing a 'safe' version of a user-provided string for keys or filenames
- Cleaning up scraped data before tokenization
- Stripping decoration from a phrase for fuzzy matching
- Preparing input that's strictly letters and digits
How it works
The regex /[^\p{L}\p{N}\s]/gu matches any character that is not a letter, digit, or whitespace, and removes it. Letters from every script and digits from every numeral system are preserved.
Examples
Hello, world! 🎉 #welcome @user
Hello world welcome user
Frequently asked questions
- What counts as 'special'?
- Anything that's not a letter, digit, or whitespace. Punctuation, symbols, emoji, control characters, and pictographs are all removed.
- Are spaces preserved?
- Yes — whitespace (\s) is kept. To remove spaces too, follow with the trim-all-whitespace tool.
- How does this differ from remove-punctuation?
- Remove-punctuation strips only \p{P} characters (real punctuation). This tool also removes symbols (\p{S}: math symbols, currency, emoji) and any other non-alphanumeric character.