Remove Punctuation

Paste text to remove its punctuation and keep the letters, digits and spaces, with the apostrophes, hyphens and decimal points inside words and numbers kept.

The text without punctuation appears as you type, with each removed mark shown.
Each mark you type here stays everywhere in the text.
Replace Each Mark With
More Options

Results

12 marks removed

Text Without Punctuation

Wait is it well-known or well known Don’t guess check the style guide page 42 first It costs $1,250.50 and the 2nd edition is out

Marks Removed

  1. .U+002E4
  2. “U+201C1
  3. ”U+201D1
  4. ?U+003F1
  5. ;U+003B1
  6. (U+00281
  7. )U+00291
  8. !U+00211
  9. ,U+002C1

12 marks removed, 4 kept inside words or numbers.

How to Remove Punctuation From Text

  1. Paste your text into Your Text. The text without punctuation appears on the right as you type, with a bar where each mark was.
  2. Leave the three Keep switches on to keep the apostrophes in words such as don’t, the hyphens in words such as well-known and the points and commas in numbers such as 1,250.50. Turn a switch off to remove those marks as well.
  3. Type any marks you want to keep in Marks to Keep, such as @. for email addresses or # for hashtags.
  4. Under Replace Each Mark With, keep A Space so that words joined by a mark, such as and/or, are still apart, or pick Nothing to join them.
  5. Check Marks Removed for each mark and how many times it was removed, then select Copy Text to copy the text without the marks.

Example With Quotes, Prices and Contractions

The example text has an ellipsis, curly quotes, a semicolon, brackets, a price and a contraction:

Wait… is it “well-known” or well known? Don’t guess; check the style guide (page 42) first! It costs $1,250.50, and the 2nd edition is out.

With the default settings 12 marks are removed and 4 are kept: the hyphen in well-known, the apostrophe in Don’t, and the comma and point in the price. The result is:

Wait is it well-known or well known Don’t guess check the style guide page 42 first It costs $1,250.50 and the 2nd edition is out

The full stop is removed 4 times, three of them in the ellipsis. The dollar sign is kept, because it is a currency symbol and not a punctuation mark; turn on Also remove maths and currency symbols under More Options to remove it, for 13 removals. With the three Keep switches off, 16 marks are removed and the words read well known, Don t and $1 250 50.

What to Replace Each Mark With

With A Space, each mark becomes a space, and with Tidy the spaces left where marks were on, extra spaces are removed, so Hello, world. still becomes Hello world. The two choices differ when a mark is between two letters or digits with no space:

TextA SpaceNothing
pages 10–12 and/or laterpages 10 12 and or laterpages 1012 andor later
The U.S. team won 3.5 to 2.The U S team won 3.5 to 2The US team won 3.5 to 2

With A Space, and/or and a page range are still apart, while with Nothing, abbreviations such as U.S. are one word. The en dash in a range such as 10 to 12 is a dash, so it is removed; type it in Marks to Keep to keep it.

Apostrophes, Hyphens and Numbers

An apostrophe is kept when it has a letter or digit right before it and right after it, which is true of contractions and of names such as O’Brien. The straight apostrophe and the curly one (U+2019) are both kept. In Don't stop: it's the '90s, rock 'n' roll. the result is Don't stop it's the 90s rock n roll: the apostrophes in Don’t and it’s are kept, while the ones before 90s and around n have a space on one side and are removed.

A hyphen is kept with a letter or digit on both sides, as in well-known and COVID-19; that is the hyphen-minus key, the Unicode hyphen (U+2010) and the non-breaking hyphen (U+2011). A point or a comma is kept with a digit on both sides, so 3.5, 1,000 and 1.000,5 are kept whole, while the full stop at the end of a sentence that ends in a number is still removed: The U.S. team won 3.5 to 2. becomes The U S team won 3.5 to 2.

How to Remove Punctuation From a String in Python

In Python, string.punctuation contains 32 ASCII characters: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~. A common way to remove them is text.translate(str.maketrans('', '', string.punctuation)). With that, the symbols $ + < = > ^ ` | ~ are removed as well, and curly quotes, long dashes and the ellipsis character are left in the text, because they are not ASCII. The apostrophe in don’t is removed too.

Unicode Punctuation Categories

A character counts as punctuation when it is in one of the seven punctuation categories of the Unicode Character Database. Of the 32 ASCII characters that are not letters, digits or spaces, 23 are punctuation and 9 are symbols: $+<=>^`|~. The categories include the marks of every script, so Spanish inverted marks, French guillemets and Chinese and Japanese full stops are removed too: ¿Qué tal? « Bonjour » 【注意】。 has 7 marks.

CategoryNameExamples
PcConnector punctuation_
PdDash punctuation- ‐ –
PsOpen punctuation( [ { 【
PeClose punctuation) ] } 】
PiInitial quote“ ‘ «
PfFinal quote” ’ »
PoOther punctuation. , ; : ! ? ' " # % & * @ / \ ¿ ¡ … § 。 、

The long dash (em dash, U+2014) is in Pd as well. These symbol categories are not punctuation and are kept unless the switch is on:

CategoryNameExamplesHere
SmMaths symbol+ < = > | ~ × ÷Removed with the switch
ScCurrency symbol$ € £ ¥Removed with the switch
SkModifier symbol^ ` ¨Removed with the switch
SoOther symbol© ® °Kept

Other symbols such as © and emoji are always kept. To remove those, or any characters you list, use the Character Remover.

How Punctuation Marks Are Found and Spaces Are Tidied

The text is read one Unicode character at a time. A character in the categories Pc, Pd, Ps, Pe, Pi, Pf or Po, or in Sm, Sc or Sk with the symbol switch on, is a mark. A mark typed in Marks to Keep is kept. An apostrophe or hyphen with a letter, combining accent or digit on both sides is kept while its switch is on, and so is a point or comma with a decimal digit on both sides. Every other mark is replaced with a space or with nothing and counted.

With Tidy the spaces left where marks were on, a run of spaces around a removed mark becomes one space, or to none at the start or end of a line; spaces that were not next to a removed mark are left as they are, as are line breaks and tabs. In Marks Removed, each mark is listed with its code point, the most removed first. The first 2,000 removals are marked in the result. The text is changed in your browser and is not sent anywhere.

FAQs

Q1. How Do I Remove Punctuation From Text?

To remove punctuation from text, paste it into the box and copy the result with Copy Text. Commas, full stops, quotes, brackets and the other marks are removed as you paste, while letters, digits and spaces stay, so the sample sentence loses 12 marks and keeps its words readable.

Q2. Does Removing Punctuation Remove Apostrophes?

Apostrophes inside words stay while Keep apostrophes inside words is on, so don’t and O’Brien keep theirs. An apostrophe with a space on one side, such as a closing quote mark, is removed, and with the switch off every apostrophe goes, so don’t becomes don t or dont.

Q3. Which Characters Count as Punctuation?

Punctuation here means the characters in the seven Unicode punctuation categories: dashes, brackets, quote marks, the connector underscore and other marks such as . , ; : ! ? # % & * @ and /. Of the 32 ASCII marks on a keyboard, 23 are punctuation, and curly quotes and the marks of other scripts are punctuation as well.

Q4. Is a Dollar Sign Punctuation?

The dollar sign is not punctuation but a currency symbol in Unicode, like the euro and pound signs, so it stays when punctuation is removed. The plus, equals, less than and greater than signs are maths symbols, and you can remove them along with currency symbols by turning on Also remove maths and currency symbols under More Options.

Q5. Can I Keep Some Punctuation Marks?

You can keep some punctuation marks by typing them in Marks to Keep, and they then stay everywhere in the text. For example, typing @ and a full stop keeps email addresses whole, while the switches above the field keep apostrophes, hyphens and number separators only inside a word or a number.

Sources

Unicode Character Database (UnicodeData.txt) and the Unicode Standard, chapter 4, for the general categories P and S. Python documentation, string module, for string.punctuation.