Remove Punctuation
Strip out commas, full stops, quotes, brackets and dashes — while keeping the apostrophes and hyphens that live inside words, if you want them.
Runs 100% in your browser•Nothing is uploaded to a server•Instant results
Options
Also clean up
Each of these runs the same code as its own page. The full set, all switched on at once, is the text cleaner.
Input
Before and after
What counts as punctuation, and what does not
This tool removes the characters Unicode classifies as punctuation: full stops, commas, colons, semicolons, question and exclamation marks, apostrophes, quotation marks of every shape, brackets of every shape, hyphens, en and em dashes, slashes, ellipses and the rest. It does not touch symbols — the plus sign, equals, less-than, greater-than, the pipe, the tilde, the caret, the backtick and every currency sign are Unicode symbols rather than punctuation, and a tool that silently ate the plus in a phone number would be the wrong tool. If symbols are what you are after, remove special characters handles those. The split surprises people in the other direction too: % # @ & * / are all punctuation in Unicode's classification, so they do go.
The keep setting is what makes this usable on real text. Removing everything turns “It’s a well-known problem” into “Its a wellknown problem”, which is fine if you are building a bag of words for a frequency count and wrong if a human has to read the result. Keep apostrophes and hyphens preserves contractions and compound words while still clearing out the sentence furniture. Keep sentence endings does the opposite: it drops the brackets, quotes and dashes but leaves the text still punctuated into sentences.
Curly punctuation is the part people get wrong by hand. Real text is full of ‘ ’ “ ” rather than their ASCII lookalikes, so a keep list written as ' misses every curly apostrophe in the document and “don’t” silently loses the very mark you asked to keep. With fold curly quotes and apostrophes switched on, the typographic forms are mapped to the straight ones first, so a kept apostrophe is kept whichever version was typed. The en dash and the em dash are deliberately not folded onto the hyphen: “well-known” is one word and “a — b” is a sentence break, so keeping hyphens should not quietly keep every dash as well.
Replacing each mark with a space rather than nothing matters for anything that will be split into words afterwards: north,south,west becomes three words rather than one. It does leave runs of spaces behind where several marks sat together, which is what the “extra spaces” box under the tool is there to tidy up.
Preparing a line for a word-frequency count
“It’s not that simple,” she said — and, frankly, she was right.
Keeping apostrophes, replacing the rest with a space: It's not that simple she said and frankly she was right
Punctuation questions
Does this remove the plus sign, the equals sign and currency symbols?
No. Unicode splits these characters into two categories, and + = < > | ~ ^ ` $ € £ are all classed as symbols rather than punctuation. Removing them from a phone number, an equation or a price is a different job with different consequences, so it lives on the remove special characters page where the choice of what survives is the first control.
How do I keep the apostrophe in “don’t” but lose the quotation marks?
Choose “apostrophes and hyphens inside words”. Straight and curly apostrophes are both kept, and with the folding option on the curly one is handed back as a straight ' so the whole document is consistent. Quotation marks, brackets, dashes and everything else still go. That combination is the usual one for cleaning text before a word count, because it keeps contractions and hyphenated compounds as single words.
Why did my curly apostrophe come back as a straight one?
Because you asked to keep that mark and the fold option is on. ‘ ’ “ ” are separate characters from ' and ", so a keep list has to cover both forms or half of them slip through, and folding to the straight form is what makes the output consistent. Switch the folding option off if you would rather the original character came back untouched. Note that the en and em dash are not folded onto the hyphen — they are a different mark, and keeping hyphens for “well-known” should not also keep every dash.