Remove Special Characters from Text — Strip Symbols Online
Keep only the characters you need — letters, numbers, Chinese text, spaces, line breaks — and delete or replace everything else. Runs entirely in your browser.
Characters: 0
Characters: 0
Keep
What counts as a special character
The category is broad. Punctuation marks — . , ! ? ; : " ' ( ) [ ] { } — are the most common. Symbols used in writing and mathematics — @ # $ % ^ & * + = | \\ / ~ ` < > — follow close behind. Currency signs (€ £ ¥), typographic marks (em dash —, ellipsis …, curly quotes “”), and emoji are all special characters. So are invisible control characters, though those are better handled by the invisible character remover, which produces a per-character report. If you only need to remove emoji without touching other punctuation, the remove emojis tool handles that in a single pass.
What stays depends entirely on your use case. For a URL slug, only lowercase ASCII letters, digits, and hyphens are safe. For a username field, letters and numbers are the usual minimum. For plain-text export of a mixed English-Chinese document, letters, numbers, Chinese characters, spaces, and newlines should all survive. This tool gives you those controls explicitly.
Why you might need to remove special characters
File system safety: a filename like report (Q4).pdf causes errors in many shell scripts. reportQ4.pdf does not. Removing parentheses, spaces, and dots from batch-generated filenames before writing them to disk prevents a category of runtime failure entirely.
Username and slug generation: authentication systems typically allow only letters, numbers, hyphens, and underscores. A display name entered by a user may contain any character. Stripping everything else produces a safe candidate that the user can then adjust.
Plain-text export from word processors: a document exported from Word or Google Docs arrives with curly quotes (“”), em dashes (—), and ellipses (…). Plain-text parsers expect straight quotes, hyphens, and three periods. Removing or replacing the typographic variants fixes the incompatibility.
NLP and machine learning preprocessing: tokenisers and classifiers trained on ASCII text may treat Unicode punctuation as unknown tokens. Stripping non-ASCII characters from the input before processing avoids that class of error.
Database safety: an apostrophe in a value that is interpolated directly into a SQL string causes a syntax error. Removing special characters from user input before storing is a basic sanitisation step, though it does not replace parameterised queries.
A concrete example
Input: "Hello, world! It's 2024 — let's go." — 37 characters. Keep letters + numbers + spaces, replace symbols with space: "Hello world It s 2024 let s go " — after collapsing extra spaces: "Hello world It s 2024 let s go" — 30 characters. Apostrophes became spaces, which then merged with adjacent spaces.
Keep letters + numbers + spaces, delete symbols: "Hello world Its 2024 lets go" — 28 characters. Apostrophes are gone entirely, which glues "It's" into "Its" and "let's" into "lets". For machine-readable contexts that is often acceptable; for prose it is not.
Input: "Price: €99.00" — 13 characters. Keep alphanumeric, delete: "Price9900" — 9 characters. The euro sign, colon, space, and period are all removed. Useful for extracting a number from a formatted string when only the digits matter.
Replace with a space versus delete
Replacing with a space prevents two adjacent words from being joined. The string "cat&dog" with delete produces "catdog". With replace-by-space it produces "cat dog". For prose, replacing is almost always the safer choice because a glued word is harder to detect than an extra space.
Deleting is appropriate for structured identifiers. A product code "SKU-12345" where you want "SKU12345", or a phone number "+1 (800) 555-0100" where you want "18005550100" — delete mode produces the right result cleanly.
After replacing symbols with spaces, multiple spaces will appear wherever a symbol had spaces around it. Running the result through the remove extra spaces tool collapses them back to single spaces.
The keep options explained
Keep letters (a–z, A–Z) preserves the 52 ASCII letter characters. Accented Latin characters — é, ü, ñ — are outside this range and will be removed. If your text is primarily English, this is usually correct. For multilingual text with accented characters, check the output before committing.
Keep numbers (0–9) preserves the ten ASCII digit characters. Non-ASCII digits from other numeral systems are not included.
Keep Chinese characters preserves the CJK Unified Ideographs block (U+4E00–U+9FFF) and its extensions, covering the characters used in Simplified and Traditional Chinese, Japanese kanji, and Korean hanja. Full-width Chinese punctuation (。,!?) is not in this block and will be removed unless you are keeping other punctuation explicitly.
Keep spaces (U+0020) preserves word boundaries. Without it, all surviving characters concatenate into one string with no separators.
Keep newlines (U+000A) preserves paragraph structure. Without it, the output is a single line regardless of how many line breaks the input had.
What this tool does not do
It does not transliterate. "café" becomes "caf", not "cafe". The é is removed rather than converted to its ASCII equivalent. If you need ASCII representations of accented letters, a dedicated transliteration library handles that step.
It does not selectively preserve specific symbols. You cannot say "keep hyphens and underscores but remove everything else." If you need to preserve hyphens for slug generation, process the text here and then restore the separators you need in a second pass.
For em dashes specifically — if you want them replaced with commas or hyphens rather than deleted — the em dash remover gives you those replacement options with a count of how many dashes were found.
Four common mistakes
Unchecking Keep spaces by accident. Every word in the output will be joined into one continuous string. Double-check that option before pressing the button, especially if you are pasting in a hurry.
Expecting accented letters to survive. é, ü, and ñ are not in the ASCII letter set. If you are cleaning text with accented characters that must be preserved — French, German, Spanish, Portuguese, Vietnamese — do not use this tool without first verifying the output.
Assuming the output is safe for HTML. Even after removing special characters, a string like script still needs HTML escaping if it is going into markup. Character removal and HTML sanitisation are different operations.
Running this on source code. Braces, brackets, operators, and semicolons are all special characters. Running symbol removal on code will destroy every line of syntax. Only use this on plain text and natural-language content.
Your text stays in your browser
Processing runs as JavaScript inside your current tab. Nothing is sent to any server, nothing is stored on your device, and refreshing the page clears the input and output. You can verify this with the browser network panel: no outgoing request appears when you click the process button.
Other tools on this site
If duplicate lines appeared after stripping symbols, use the remove duplicate lines tool. If multiple spaces appeared where symbols were replaced, the remove extra spaces tool collapses them.
For invisible Unicode characters — zero-width spaces, directional marks, soft hyphens — the invisible character remover gives a detailed per-character report. For em dashes specifically, the em dash remover lets you pick a replacement rather than just deleting.
Stripping Symbols From CSV and Spreadsheet Exports
Spreadsheet exports carry formatting that made sense inside the application but becomes noise in downstream processing. A currency column exported as text arrives with values like $1,234.56 or € 2.100,00. The thousands separator — a comma in US locale, a period in German locale — is the same character used as the CSV field delimiter, which means a naive parser will split one cell into three. The currency symbol itself has no numeric meaning. Before this data enters a database or a calculation pipeline, both the currency sign and the thousands separator need to go.
The right cleaning order matters. Remove the outer quotation marks that the spreadsheet wrapped around fields containing commas first, then strip the currency symbols and separators. If you strip the commas before removing the quotes, the field boundaries shift and subsequent operations act on the wrong segments. Paste the raw exported text into this tool, enable delete mode rather than replace-with-space, and keep only numbers and the decimal separator you intend to preserve. For a column of prices, that means keeping digits and the period (if your locale uses period as decimal) and removing everything else.
Headers in spreadsheet exports often arrive with trailing spaces, parentheses around units — Revenue (USD) — or slash-separated variants like Start Date / End Date. These characters cause problems when the headers are used as database column names or JSON keys. Running the header row through this tool with a replace-by-space pass, then collapsing extra spaces using the remove extra spaces tool, produces clean identifiers. Remove line breaks if the export wrapped long headers across two lines — the remove line breaks tool handles that in one step.
A common mistake is running symbol removal on the entire CSV rather than on individual columns. A CSV file contains structural characters — commas, quotes, newlines — that are part of the format, not the data. Stripping them destroys the file structure. Clean each column's values in isolation, then reassemble. If you are working with a spreadsheet application, use a formula in a helper column to strip the symbols cell by cell, then paste the helper column over the original values.
Special Characters in URLs and Query Strings
A URL is not free-form text. Characters outside the unreserved set — letters, digits, hyphen, underscore, period, tilde — must be percent-encoded before they can appear in a URL. A space becomes %20 or + depending on context. An ampersand becomes %26. A hash becomes %23. Deleting these characters instead of encoding them produces a different URL that may resolve to a different resource or return a 404.
The important distinction is between characters that structure the URL and characters that appear in parameter values. The query string ?q=hello+world&lang=en contains an ampersand that separates two parameters and a plus sign that encodes a space inside a value. If you strip all special characters from this string, you lose both the structure and the encoded value. The correct operation is to decode the value first, apply your text cleaning to the decoded string, and then re-encode it for inclusion in the URL.
When should you actually delete special characters from URL-related text? Primarily when generating slugs from page titles or product names. The string "10% Off — Summer Sale!" cannot appear verbatim in a URL path. The intended output is something like 10-off-summer-sale. The right approach: remove the percent sign and exclamation mark, replace the em dash and spaces with hyphens, and lowercase the result. This tool handles the first step — removing the symbols. A second pass in your application handles the separator replacement.
Query string parameters also carry risk in a different direction: user-supplied text that is interpolated into a URL without encoding can introduce injection vulnerabilities. Symbol removal is not a substitute for proper URL encoding — it is a preprocessing step when you want a clean, human-readable identifier rather than an encoded one. For text that must survive a round-trip through a URL unmodified, use percent-encoding, not character deletion. If your text contains zero-width spaces or other invisible characters, those should be removed before encoding, since they will otherwise encode into legitimate-looking but semantically empty sequences.
Cleaning Text Before Machine Translation or TTS
Machine translation systems and text-to-speech engines each have failure modes that originate in non-standard punctuation. Full-width punctuation characters — the ideographic comma 、, the ideographic period 。, the full-width exclamation mark ! — are common in Chinese and Japanese text. When this text is passed to a translation model fine-tuned on English training data, those characters may be treated as unknown tokens or passed through unchanged to the output, producing a sentence that ends with 。 instead of a period.
Em dashes and en dashes are a subtler problem. Many translation APIs split their input into sentences before processing. The sentence splitter typically looks for periods, question marks, and exclamation marks. An em dash used as a sentence break — as is common in English prose — does not trigger the splitter. The model receives a run-on input and may translate it as a single clause instead of two. Replacing em dashes with commas or periods before submitting the text to the translation API gives the splitter clean boundaries.
Non-breaking spaces (U+00A0) are nearly invisible but cause real problems in both translation and TTS. In translation, a non-breaking space between a number and its unit — 100 km — may prevent the tokenizer from splitting the number from the unit, causing the unit to be translated inconsistently. In TTS, a non-breaking space is sometimes read aloud as a pause of incorrect duration, or the engine may attempt to spell out the character name. The remove extra spaces tool normalizes non-breaking spaces to regular spaces as part of its cleanup pass.
For TTS specifically, special characters that look like punctuation but are not ASCII punctuation can cause the synthesizer to pause unexpectedly, skip syllables, or fall back to a robotic spelling-out mode. Curly quotes, typographic apostrophes, and Unicode dashes all fall into this category. Replacing them with their ASCII equivalents — straight quotes, hyphens — before passing the text to the TTS API produces more natural-sounding output. If the text also contains AI-generated content, running it through the clean AI text tool first removes em dashes, curly quotes, and other typographic patterns in a single pass before you strip the remaining symbols here.
Frequently Asked Questions
▸Will accented characters like é, ü, or ñ be removed?
Yes, under the default Keep letters (a–z, A–Z) setting, accented Latin characters are removed because they fall outside the ASCII range. For Spanish, French, German, or Portuguese text, this removes real content words. Check the output carefully before using it. If you need accented characters preserved, a dedicated Unicode-aware transliteration tool is the right approach.
▸Does this tool remove emoji?
Yes. Emoji are Unicode characters outside the letter, digit, and space sets, so they are removed in the default configuration. If your content intentionally includes emoji — social media copy, product descriptions for platforms that support them — do not run this tool on that content. All emoji present will be deleted.
▸I need to keep hyphens and underscores for URL slugs. Can I do that?
A specific option for keeping hyphens and underscores is on the roadmap. For now, a two-step workaround is: run the text through this tool to strip everything except letters, numbers, and spaces — then open a text editor and use find-and-replace to substitute spaces with hyphens. That produces a slug-safe string without requiring the tool to support partial symbol preservation.
▸What is the difference between this and the invisible character remover?
The invisible character remover targets a specific published list of invisible Unicode code points — zero-width spaces, directional marks, soft hyphens — and reports exactly which ones it found and how many. This tool removes any character that falls outside your chosen keep set. Use the invisible character remover when you want a surgical, auditable cleanup with a full report; use this tool when you want everything except letters, numbers, and spaces removed in one pass.
▸My text has Chinese mixed with English. Will the Chinese survive?
Enable the Keep Chinese characters option. That preserves the CJK Unified Ideographs block alongside any ASCII characters you have selected. Full-width Chinese punctuation (。,!?、) is not included in that block and will be removed unless you are keeping other non-ASCII characters. The result will contain Chinese characters, ASCII letters, digits, and whatever else you opted to keep.
▸What happens to HTML entities like &amp; or &lt;?
HTML entities are sequences of plain characters — an ampersand, some letters, and a semicolon. If you keep letters and the semicolon is a special character (which it is), &amp; would become &amp without the trailing semicolon, and &lt; would become &lt. The entity breaks. If your text contains HTML that should be preserved, do not run it through this tool — process the plain text content before it is inserted into HTML markup.