Use the tool
Paste text into the input, or click Upload to choose a .txt file. You can also drop a text file anywhere on this page. Choose the controls you need; the output updates when the text or an option changes.
- Select the punctuation to preserve, if any.
- Choose Remove or Replace with space.
- Use Clean up leftover whitespace when repeated spaces or tabs should be collapsed.
- Check the result, then use Copy or Download.
How punctuation is matched
The tool matches Unicode punctuation with \p{P}. This includes marks such as commas, quotation marks, brackets, dashes, ellipses, and periods. Letters, digits, symbols, whitespace, and line breaks are outside this class, so currency symbols, math operators, and emoji are preserved.
Choose what to preserve
- Preserve apostrophes keeps straight and curly apostrophes. Contractions and possessives remain intact only when this control is enabled.
- Preserve hyphens & dashes keeps hyphens and Unicode dash characters. Hyphenated words and ranges remain intact only when this control is enabled.
- Preserve decimal points keeps a period only when it is directly between two digits, such as
19.99. - Also keep: preserves punctuation characters entered in the field. Entering a non-punctuation character has no additional effect because it is already outside the matching rule.
Choose the output action and whitespace cleanup
- Remove deletes each matched punctuation character. Adjacent text can join.
- Replace with space substitutes each matched character with a space.
- Clean up leftover whitespace collapses repeated spaces or tabs and trims trailing horizontal whitespace on each line. It does not merge line breaks, and it also affects whitespace that was already in the input.
Check and take the result
- When input is present,
#statsBarreports the number of punctuation marks removed or replaced. - Enable Show before-and-after preview to display Before and After panels. Removable matches are highlighted in Before; After shows the processed text.
- Use Copy to copy the output or Download to create
text-without-punctuation.txt.
Input files and processing limits
The Upload picker accepts .txt files, and dropped files are read as text. The transformation runs in the browser; the directly imported script does not send the text to a processing endpoint.
The inspected implementation does not document a maximum input length, upload file-size limit, browser-support matrix, or detailed handling for unreadable or unusually large files.
What the tool does not remove
The \p{P} rule does not match currency symbols, math operators, emoji, or digits. Use Remove Special Characters for a broader non-alphanumeric cleanup, or Remove Numbers from Text to remove digits.
Frequently Asked Questions (FAQs)
What counts as punctuation in this tool?
The implementation matches characters in the Unicode punctuation category, including commas, periods, quotation marks, brackets, dashes, and ellipses. It then excludes characters covered by active preservation controls or the custom keep list.
Will it remove currency symbols, emoji, or math operators?
No. Only characters in the Unicode punctuation class are matched. Currency symbols, math symbols, and emoji belong to other Unicode categories and remain unchanged. Use Remove Special Characters if you need to strip a broader set of non-alphanumeric characters.
Can I keep apostrophes in contractions like don't?
Yes. Enable Preserve apostrophes. Straight and curly apostrophes are then left in place while other matched punctuation is processed.
How does decimal point preservation work?
Enable Preserve decimal points to keep a period only when it sits directly between two digits, such as 3.14 or 19.99. A sentence-ending period is still removed.