Remove Punctuation from Any Text
Word lists, text analysis and string comparisons often work better without commas, quotes and brackets. This tool will remove punctuation of every kind, in any language, and leave letters, digits and whitespace intact.
Example
Input:
Hello, world! "Quotes" — dashes; (brackets) & symbols: $100 + tax?
Punctuation removed:
Hello world Quotes dashes brackets symbols $100 + tax
Punctuation and symbols removed:
Hello world Quotes dashes brackets symbols 100 tax
What counts as punctuation
The tool uses the Unicode punctuation categories, so it recognizes marks from many writing systems, not just the ASCII set. Removed by default:
- sentence marks:
. , ; : ! ?and the Spanish¿ ¡; - quotes and apostrophes, straight and curly, plus guillemets
« »; - hyphens and dashes (
- – —), brackets and braces; - other marks such as
& % @ # * / \ _ § ¶ • … ·.
The optional symbols setting also removes characters Unicode classifies as symbols: currency signs ($ € £), math operators (+ = < > | ~), ^ and the backtick, marks such as © ® ™ °, and emoji.
Side effects to expect
- Contractions merge: “don't” becomes “dont” and “e-mail” becomes “email”.
- Numbers change: “3.14” becomes “314” and “1,000” becomes “1000”, which alters the value.
- Emails and URLs break: “a@b.com” turns into “abcom”.
- Double spaces: removing a dash that stood between two spaces leaves two spaces. Clean them up with Remove Extra Spaces.
Accented letters are letters, not punctuation, so “Qué” keeps its accent. Use Remove Accents for that.
Removing punctuation in code
The common one-liners behave differently, especially with curly quotes, dashes and underscores:
| Method | Curly quotes and dashes | Underscore | Symbols like $ and + |
|---|---|---|---|
Python str.translate with string.punctuation | kept (ASCII only) | removed | removed |
Python re.sub(r"[^\w\s]", "", s) | removed | kept | removed |
JavaScript s.replace(/\p{P}/gu, "") | removed | removed | kept |
The JavaScript version matches this tool's default, because both use the Unicode punctuation categories; add \p{S} to the pattern to also remove symbols, like the optional setting here. Python's string.punctuation contains only the 32 ASCII marks, so text pasted from a word processor keeps its “smart” quotes and em dashes.
When to remove punctuation
- Preparing text for word counts, tokenizing or simple natural-language processing.
- Checking palindromes and anagrams, where only letters matter.
- Normalizing names or titles before comparing or de-duplicating them.
- Building tag lists and keyword lists from sentences.
If you only want to know which words occur most often, the Word Frequency Counter already ignores punctuation, so you can skip this step.
Privacy
All processing happens in your browser.