Removing punctuation is one of those jobs that looks like a single step and turns out to have several decisions hidden inside it. You might be preparing survey answers for a word cloud, cleaning product titles before de-duplicating them, building a list of keywords, or feeding text into a script that counts words. In each case, commas, quotation marks and brackets get in the way.
But "remove all punctuation" can also turn don't into dont, well-known into wellknown, and $19.99 into 1999. This guide explains what counts as punctuation, which characters you usually want to protect, how to do it quickly in a browser, and how the same job looks in a spreadsheet or a few lines of code.
What counts as punctuation?
On a keyboard, punctuation looks like a short list: . , ; : ! ? ' " ( ) - /. Real-world text is messier. Text copied from word processors, websites and other languages brings in many more characters:
- Curly quotes and apostrophes: “ ” ‘ ’, plus « » and „ used in other languages.
- Dashes: the en dash (–) and em dash (—), not just the hyphen.
- The ellipsis character (…), which is one character, not three dots.
- Non-English marks: ¿ and ¡ in Spanish, 。 and 、 in Chinese and Japanese, 「 」 corner brackets.
- Other marks such as §, ¶, # and @.
Unicode, the standard that defines every character your computer can display, sorts characters into categories. One category is punctuation (dashes, quotes, brackets, full stops and so on). A separate category is symbols: currency signs like $ and €, maths signs like + and =, and marks such as © and ™. Emoji are symbols too. This distinction matters, because "remove punctuation" and "remove punctuation and symbols" give different results.
A few characters surprise people. The @ sign, # and & are classified as punctuation, not symbols. So stripping punctuation from an email address or hashtag removes the @ and # as well.
The characters you usually want to keep
Before you strip everything, think about what the punctuation is doing inside words:
| Example | Blind removal | Usually better |
|---|---|---|
| don't, it's, O'Brien | dont, its, OBrien | keep inner apostrophes |
| well-known, e-mail, COVID-19 | wellknown, email, COVID19 | keep inner hyphens |
| "Done. Next step?" | Done Next step | keep sentence endings if you still need sentences |
| $19.99 | 1999 | protect or extract numbers first |
The apostrophe in it's distinguishes it from its. The hyphen in re-cover distinguishes it from recover. If you are counting or matching words, losing these can merge words that should stay different.
Remove punctuation in your browser
The Remove Punctuation tool handles Unicode punctuation from any language and lets you protect the characters above.
- Open Remove Punctuation and paste your text into Text with punctuation, or click Sample to load an example with curly quotes, dashes and non-English marks.
- Choose which characters to keep:
- Keep apostrophes in words keeps apostrophes that sit between letters, such as don't and O'Brien.
- Keep hyphens in words keeps hyphens between letters or digits, such as well-known and COVID-19.
- Keep sentence endings keeps full stops, question marks and exclamation marks that end a sentence.
- Switch on Also remove symbols if currency signs, maths signs, © and emoji should go as well.
- Leave Tidy leftover spaces on to collapse the double spaces that appear where punctuation used to be and to trim each line.
- Check the result in Text without punctuation. A summary tells you how many characters were removed. Copy it or click Download to save a .txt file.
The processing happens entirely in your browser, which is useful when the text is customer feedback or internal notes.
Other ways to remove punctuation
In Excel or Google Sheets
Spreadsheets can remove specific characters with nested SUBSTITUTE functions:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,",",""),".",""),"!","")
This works for a handful of known characters but becomes unwieldy quickly, and it will not catch curly quotes unless you add them one by one. Google Sheets supports regular expressions, which is more practical:
=REGEXREPLACE(A2, "[[:punct:]]", "")
[[:punct:]] covers ASCII punctuation; curly quotes and other Unicode marks may need to be added to the pattern.
In Python
For plain English text, the standard library has a ready-made list:
import string
clean = text.translate(str.maketrans("", "", string.punctuation))
string.punctuation only includes ASCII characters, so curly quotes, dashes and non-English marks survive. For Unicode-aware removal, a regular expression with the third-party regex module and the \p{P} class matches every punctuation character.
In a text editor
Editors that support regular-expression find and replace, such as VS Code or Notepad++, can use a pattern like [^\w\s] to remove anything that is not a letter, digit, underscore or whitespace. It is quick, but it removes symbols as well and treats accented letters differently depending on the editor. For a one-off replacement of a specific character, Find and Replace is simpler.
Pitfalls and troubleshooting
Numbers lose their decimal point
Removing punctuation turns 3.5 into 35 and 1,200 into 1200. If numbers matter, pull them out first with Extract Numbers, or remove punctuation only from the columns that hold words.
Email addresses and URLs are mangled
@, dots, slashes and colons are all punctuation, so sales@example.com becomes salesexamplecom. Extract addresses and links before cleaning the rest of the text.
Words run together
When punctuation is the only thing separating two words, as in yes/no or pages 4–7, removing it joins them into yesno. If that matters, replace slashes and dashes with a space first using find and replace, then remove the remaining punctuation.
Odd spacing remains
Some "spaces" in copied text are actually non-breaking or zero-width characters, which are neither punctuation nor normal spaces. Run the text through the Text Cleaner first to normalise them, then remove punctuation.
Accents are not removed
Accents are part of the letter, not punctuation, so café stays café. If you need plain ASCII letters as well, follow up with Remove Accents.
When removing punctuation is the right step
Stripping punctuation helps when you are comparing, counting or grouping words: building a frequency list, de-duplicating keyword lists, preparing search terms, or normalising names before matching them. It is rarely the right step for text that people will read, because punctuation carries meaning. If your goal is a count of the most common words, the Word Frequency Counter already ignores punctuation, so you can skip this step entirely.
Frequently asked questions
Does removing punctuation also remove emoji?
Not by default. Emoji are Unicode symbols rather than punctuation. Switch on Also remove symbols to remove emoji, currency signs and maths signs together with punctuation.
How do I keep apostrophes in contractions?
Turn on Keep apostrophes in words. Apostrophes between two letters, as in don't or O'Brien, are kept, while quotation marks around words are still removed.
Why did the @ in my email address disappear?
In Unicode, @ is classified as punctuation. Extract email addresses before removing punctuation if you need to keep them.
Is the hyphen punctuation?
Yes. The hyphen and all dash characters are punctuation. Use Keep hyphens in words to protect hyphens inside compound words and codes such as COVID-19.
Does it work with languages other than English?
Yes. The tool uses Unicode categories, so Spanish ¿ ¡, French « », Chinese and Japanese marks such as 。、「」 are all recognised as punctuation.