Catch profanity before it ships.
An open source filter for profanity, leetspeak and look-alike characters. It runs offline in your code, or right here in your browser.
Paste text, scan, read the result.
This runs the real library in your tab. Nothing is sent anywhere.
Runs in your browser. Nothing is sent anywhere.
0 / 2000
Powered by the real library, running fully in your browser.
- Clean
- Flagged
- Edge case
One call, a structured result.
Look-alike characters and leetspeak are normalized before matching.
pnpm add glin-profanityimport { Filter } from "glin-profanity";
const filter = new Filter({ allLanguages: true });
const result = filter.checkProfanity(
"This was a c@$tle move you sc#ndrel."
);
result.containsProfanity; // true
result.profaneWords; // ["c@$tle", "sc#ndrel"]What happens to the text
- NormaliseLook-alike characters, swapped symbols and odd spacing fold back to plain letters.
- MatchWords are checked against the dictionaries you turned on, with your allowlist applied.
- ScoreEach hit is marked as a literal match or one caught after normalization.
- RedactOptionally, flagged words are replaced so you can show the clean text.
Everything a guardrail needs.
Built for production moderation, not a demo word list.
- Many languagesOne API for multilingual moderation. Turn on every dictionary or only the ones you need.
- Leetspeak and look-alikesCatches digit swaps, symbol swaps and Unicode look-alike characters.
- Custom word listsAdd terms for your domain, or allowlist words that are innocent in context.
- Offline by defaultNo cloud calls. Runs in server runtimes, edge workers and the browser.
- Configurable severityPer word severity, so you can build tiered moderation without rewriting detection.
- MCP server includedShips an MCP server so AI assistants can check text with the same rules.
Common questions.
Does it call out to a server?
No. The filter runs offline. Dictionaries load from the bundle at startup and no text is sent anywhere, so it works in air gapped environments.
Can I use a custom word list?
Yes. Pass your own word list to the filter, and add an allowlist to suppress false positives for innocent terms in your domain.
Where does it run?
Anywhere JavaScript runs: server runtimes, edge workers and the browser. A Python package is published too.
How does multilingual support work?
Turn on every bundled dictionary at once, or pass the languages you want. Each language dictionary ships as its own chunk.
Is the checker on this page the real library?
Yes. The checker above runs the published library in your browser with the settings you pick, so what you see is what your code gets.
Put it in front of your users.
Read the source, open an issue or add it to your project today.