Remove Punctuation
TX-52Paste text and strip its punctuation in one click. You can keep apostrophes, hyphens and decimal points inside words and numbers, or remove only the exact characters you list.
Runs in your browser. Nothing is uploaded.
Text
Text without punctuation
How to use it
- Paste your text into the input box.
- Tick any marks to keep: apostrophes inside words, hyphens inside words, or dots and commas inside numbers.
- Choose whether each mark is replaced with nothing or with a space, and tick the symbols option if $ + < = > should go too.
- Press Remove punctuation. For specific marks only, start the first line with -- chars: and press Remove only listed characters.
What counts as punctuation
Punctuation here means the Unicode punctuation class. It covers the ASCII marks . , ! ? ; : ' " ( ) [ ] { } - and also curly quotes, dashes, guillemets and the punctuation of many other scripts. Symbols such as $ + < = > ^ | ~ are classed as symbols, not punctuation, so they stay unless you tick the symbols option. Letters, digits, spaces and line breaks are never removed by this action.
Keeping what belongs inside words
Stripping every mark turns don't into dont, well-known into wellknown and 3.5 into 35. The keep options protect an apostrophe or hyphen only when it sits between two letters or digits, and a dot or comma only between two digits, so a sentence-ending full stop is still removed. Replace each mark with a space is useful when marks separate words, as in red,green,blue. It adds a space only where it will not make a double space or leave one at the end of a line.
Removing only some characters
Remove only listed characters takes its list from the first line, such as -- chars: ,!? and deletes exactly those characters everywhere and nothing else, so a comma inside 1,000 goes too. The list is read character by character, and a space cannot be part of it. Use it when you only want to drop question marks or commas and leave the rest of the punctuation alone.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Paste the text to remove punctuation from. | The input box is empty. | Paste or type the text first. |
Start the first line with -- chars: followed by the characters to remove, for example -- chars: ,?! | Remove only listed characters needs a first line that lists the characters. | Add a first line such as -- chars: ,?! and put your text below it. |
Questions people ask
How do I remove punctuation from a string?
Paste the text and press Remove punctuation. Every Unicode punctuation mark is deleted, while letters, digits, spaces and line breaks stay. Symbols such as $ and > are kept unless you tick the symbols option.
How do I remove commas from text but keep other punctuation?
Start the first line with -- chars: , then put your text below and press Remove only listed characters. Only commas are deleted, including commas inside numbers such as 1,000.
Can I keep apostrophes so don't stays don't?
Yes. Tick Keep apostrophes inside words. An apostrophe between two letters is kept, while quote marks at the edges of a word are still removed.
Does it remove emoji or symbols?
Emoji are untouched. Symbols such as $, +, <, = and > are only removed when you tick Also remove symbols. Emoji are not punctuation, so they stay either way.
Why did two words join together after removing punctuation?
A mark between words with no space, as in red,green, vanishes and the words run together. Set Replace each mark with to A space to keep them apart.
About this tool
Punctuation means the Unicode punctuation class, which covers ASCII marks such as . , ! ? ; : ' " ( ) - and also curly quotes, dashes, guillemets and the punctuation of other scripts. Symbols such as $ + < = > ^ | ~ are not punctuation in that classification, so they stay unless you tick the symbols option. The keep options protect a mark only when it sits between two letters or digits. Replacing with a space adds one only where it would not create a double space or leave a space at the end of a line. Remove only listed characters takes its list from a first line such as -- chars: ,!? and removes exactly those characters; a space cannot be part of the list. Letters, digits and line breaks are never touched. Nothing is uploaded.