Profanity Filter

Swear words found—
Total words—
Clean words—

How Profanity Filter is calculated: Each word is checked against a built-in list of swear words; matches are replaced with asterisks of the same length or with your custom word.

What is a profanity filter?

A profanity filter scans a piece of text for swear words and replaces them before anyone else sees the text. Paste in a comment, a chat message, or a forum post, and the filter returns the same text with every matched word covered up. The default text on this page has 11 words, and the filter finds 4 swear words in it — hell, damn, shit, and crap — leaving 63.6% of the words untouched.

Moderators use filters like this every day. A community forum, a game chat, a classroom app, or a comment section all need the same thing: user content that stays readable without the swearing. Doing it by hand means reading every message; a filter does it in a fraction of a second, and it never gets tired or misses a word because it was skimming.

This filter works with a built-in list of common English swear words. It checks whole words only, so it will not flag a harmless word that happens to contain a flagged sequence — "class" stays "class", and "pass" stays "pass". Everything runs in your browser, so the text you paste never leaves your device.

How the profanity filter works

The method is simple to state: split the text into words, compare each word against the built-in list, and replace every match. A match is replaced with asterisks of the same length, so "damn" becomes "****" and the shape of the sentence stays the same. Pick the custom option instead and every match becomes the word you typed, such as [removed].

The comparison ignores case, so DAMN, Damn, and damn are all caught. It also keeps the punctuation around a word: "shit!" becomes "****!" with the exclamation mark intact, and the word count never changes — the default text stays 11 words before and after filtering, because replacement never adds or removes words.

The clean percentage is worked out from those two counts: (11 words minus 4 flagged) divided by 11, times 100, which gives 63.6%. A text with no matches scores 100%, and a text where every word is flagged scores 0%. The number tells a moderator at a glance how much of a message needed cleaning.

Asterisks or a custom replacement: which to pick

Asterisks are the classic choice, and they suit most moderation. Readers can see that a word was removed and roughly how long it was, which keeps the sentence readable without showing the word itself. Four asterisks where "damn" was tells the reader the tone of the original without repeating it.

A custom replacement suits a different job: publishing cleaned text where asterisks would look messy. A support team pasting a customer message into a public changelog might replace every swear word with [removed], which reads as a deliberate edit rather than a blackout. A school worksheet might use "[word removed]" so the teacher can point at exactly what changed.

The choice changes nothing about detection — the same 4 words are found either way. It only changes what the reader sees. If you are moderating a live chat, asterisks are faster to read; if you are preparing text to publish, a custom word looks tidier. Try both on the same text and compare.

The replacement choice also affects how the text reads afterwards. Asterisks keep the length of the original word, so the sentence keeps its shape and the reader can guess how strong the word was. A custom replacement such as [removed] changes the length and makes the edit visible, which is better when the moderation log needs to show that something was changed. Some teams use a neutral word such as heck, which keeps the sentence readable but changes the tone. The right choice depends on whether the reader should notice the edit or glide past it.

A worked example: cleaning a comment

Take the default text: "What the hell is this damn thing? This shit is crap." It has 11 words. The filter checks each one against its list and flags four: hell, damn, shit, and crap. With asterisks selected, the output reads "What the **** is this **** thing? This **** is ****." — the same sentence, the same punctuation, and the same word count.

Switch to the custom option with [removed] as the replacement and the same text becomes "What the [removed] is this [removed] thing? This [removed] is [removed]." The word count is still 11, and the clean percentage is still 63.6%, because the filter counts words, not characters.

Try a clean sentence to see the other side: "The quick brown fox jumps over the lazy dog" has 9 words and 0 flagged, so the output is identical to the input and the clean score is 100%. That is the point of the tool — clean text passes through untouched, and only the flagged words change.

Who uses a profanity filter, and why

Forum and community moderators are the main users. A gaming forum can receive hundreds of posts a day, and a filter lets one moderator approve cleaned posts quickly instead of editing each one by hand. The filter catches the obvious words; the moderator still reads the result and decides whether the post itself is worth keeping.

Teachers and parents are the second group. A teacher preparing student writing for a display board, or a parent checking what a child typed in a chat, can clean the text in seconds. The tool is also useful for anyone quoting a heated message in a report or a slide — the quote keeps its meaning without the swearing.

Writers and support teams are a third group. A writer quoting dialogue, a support agent pasting a customer message into a ticket, or a social media manager drafting a reply all need the same thing: the message, minus the words they cannot publish. A word counter pairs well here, since it shows the length of the cleaned text before you post it.

Profanity filter vs other text tools

A profanity filter changes words; other text tools measure them or change their shape. A word counter tells you a text has 11 words without changing a letter, while this filter changes 4 of them. A case converter changes capitalisation, which is a style change, not a content change.

The closest relative on this site is the text redaction tool, which blacks out emails, phone numbers, and card numbers instead of swear words. Use the redaction tool when the risk is private data leaking, and the profanity filter when the risk is language. Many moderation jobs need both: clean the swearing for the audience, and redact the personal details for privacy.

Both tools share the same design: paste, check, copy. Neither one stores your text or sends it anywhere. If you need to check the length of a cleaned message before posting it, a character counter gives you the exact count, including spaces.

Common profanity filter mistakes

The first mistake is trusting the filter completely. No word list is complete: new slang appears, people misspell words on purpose ("sh1t", "d4mn"), and some words are only swearing in context. The filter catches the standard spellings on its list; a human still needs to read the result before it goes live.

The second mistake is the opposite: assuming a flagged word is always swearing. Some words on a list have innocent uses — "bloody" in British English can mean very, and "bitch" is also a term for a female dog. Whole-word matching avoids the worst false positives, but context still matters, so read the flagged words before you approve the cleaned text.

Third: filtering text you do not own the rights to publish, or using a filter to hide abuse instead of reporting it. A filter cleans language; it does not fix harassment, threats, or hate. If a message is abusive, report it to the platform and keep the original as evidence — do not just filter it and move on.

Fourth: forgetting that filtering is visible. Readers notice asterisks, and a page full of them reads worse than a page with none. If a text needs heavy filtering, the better answer is usually to rewrite it or reject it, not to publish a paragraph of stars. Use the filter for the occasional word, not as a cover for text that should not be published at all.

A second mistake is trusting the filter to understand context. A word list has no sense of tone, so the same word can be an insult in one sentence and a harmless part of a quote in another. A filter that blocks a word inside a quoted news headline will hide a legitimate discussion, and a filter that misses a new slang spelling will let the insult through. The practical answer is a human review step for anything the filter flags in a borderline case, and a regular update to the word list when new spellings appear in the community.

How to use this profanity filter

Paste your text into the box, or type it directly. The filter runs live as you type: the count of flagged words updates, and the filtered text appears in the box below. Pick asterisks or a custom replacement, and the output changes at once — there is no button to press.

To copy the result, use the Copy button next to the output box. To check a different text, clear the box and paste again. The default text is a good first test: 11 words, 4 flagged, 63.6% clean. Change one word — replace "crap" with "great" — and watch the flagged count drop to 3.

Everything runs in your browser. No sign-up, no account, no data sent anywhere — your text never leaves your device. It works offline once the page has loaded, so you can use it anywhere you moderate. Try it with a real comment before you need it, and check the result with your own eyes before you publish.

Start with the default text and press the filter button to see the result, then change the replacement mode and run it again on the same text to compare. The comparison shows how much of the sentence survives each mode, which is the fastest way to pick one. When the result looks right, copy it and paste it where the comment is published. If a word you expected to be caught slips through, add it to the custom list and run the text again — the custom list is checked before the built-in list, so your addition takes priority.

Frequently Asked Questions

No. The filter matches whole words against a built-in list of standard spellings, so deliberate misspellings like sh1t or d4mn are not caught. It also cannot catch new slang that is not on the list. Read the result yourself before publishing, especially for live chat.

Asterisks replace each flagged word with stars of the same length, so damn becomes **** and the sentence keeps its shape. A custom replacement swaps every flagged word for the same word you typed, such as [removed], which reads tidier in published text. Detection is identical either way.

No. Replacement swaps one word for another, so the default text stays 11 words before and after filtering. The clean percentage is calculated from the word count: (11 words minus 4 flagged) divided by 11, times 100, which gives 63.6%.

Yes. Everything runs in your browser — your text is never uploaded, stored, or sent anywhere. You can use it offline once the page has loaded, and you can paste sensitive text without worrying about who sees it.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.