Remove punctuation from text, with apostrophes and hyphens kept

Paste text and every punctuation mark is removed, while the apostrophes and hyphens inside words stay unless you untick them.

Live demo · real result from this tool

Result

Hello world Isn't this finally clean Yes

Processed on your device — nothing is uploaded.

How to use the Punctuation Remover

  1. Paste your text into Your text.
  2. Leave Keep apostrophes inside words (don’t) ticked to protect contractions and possessives.
  3. Leave Keep hyphens inside words (state-of-the-art) ticked to protect compound words.
  4. Tick Also remove symbols (# $ % + = @ …) if you want currency signs, maths signs and emoji gone too.
  5. Copy the cleaned text.

What it does and when to use it

Punctuation is useful for readers but often gets in the way of processing text. Removing it helps when you:

  • prepare text for word counts, word clouds or frequency lists, so “end,” and “end” count as one word;
  • build a list of keywords or tags from a sentence;
  • clean song lyrics, captions or transcripts for a data set;
  • make a plain version of a title for a file name.

The two “keep” options exist because blanket removal damages words. Without them, “don’t” turns into “dont” and “well-known” into “wellknown”, which changes spelling and can merge separate words.

For a file name or web address, the URL Slug Generator does this job and also lowercases and joins the words. To remove only a few chosen characters, use Remove Specific Characters. Text copied from web pages may also hide zero-width characters; the Invisible Character Remover clears those.

How it works

First, apostrophes between two letters and hyphens between two letters or digits are swapped for temporary placeholders, if those options are on. Next, every character in the Unicode “punctuation” class is deleted, except # % ‰ @ & * / § ¶ † ‡ and the backslash, which are treated as symbols. When you tick the symbols option, those go too, along with the Unicode “symbol” class. The placeholders are turned back into ’ and -. Note that a curly ’ inside a word comes back as a straight ’. Finally, runs of spaces are reduced to one and each line is trimmed. The text is processed in your browser.

Worked examples

Default settings. Wait... is it "well-known"? Yes: it's state-of-the-art! becomes Wait is it well-known Yes it's state-of-the-art. The dots, quotes, question mark, colon and exclamation mark go; the apostrophe and the hyphens inside words stay.

Keep options off. The same sentence with both boxes unticked gives Wait is it wellknown Yes its stateoftheart.

Symbols too. “Email me @ 9am: 50% off + free #shipping” with the symbols option ticked gives Email me 9am 50 off free shipping. With it unticked, the @, %, + and # all stay: Email me @ 9am 50% off + free #shipping.

Limits and tips

  • Hyphens with spaces around them, such as a dash used in a sentence, are removed.
  • Accented letters and letters from other alphabets are never removed.

Frequently asked questions

Are # and @ removed when I do not tick the symbols option?
No. Unicode, the standard that classifies characters, files #, %, @, &, *, / and the backslash as punctuation, but this tool treats them as symbols, so they stay until you tick the symbols option. That option also removes characters Unicode calls symbols, such as + = $ € < > ^ | ~ ©, and emoji.
What happens to numbers like 3.14 or 1,000?
The point and the comma are punctuation, so 3.14 becomes 314 and 1,000 becomes 1000. If your text has numbers you need to keep, remove only chosen characters with Remove Specific Characters instead.
Which apostrophes are kept?
Only an apostrophe with a letter on both sides, as in don't or O'Neil. Straight (') and curly (’) apostrophes both count. A quote mark at the start or end of a word, as in 'n' or the '90s, is removed.
Does it keep line breaks?
Yes. Each line is cleaned separately, so your line structure stays. Double spaces left behind are reduced to one, and spaces at the start and end of each line are trimmed.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close