What it does
NSFWJS helps websites and apps spot inappropriate images. It sorts a picture into five groups, such as neutral, drawing or explicit, and gives a score for each.
It runs in the user's own browser, or in Node.js on a server, so images do not have to be sent elsewhere to be checked. Its makers say it is not perfect but is about 90 percent accurate or more, depending on the model size.
It is often used for content moderation, such as blurring or blocking unsuitable uploads.
Who it's for
Web and app developers who need to filter or moderate user images.
Can I use it without coding?
Developers only. A code library for JavaScript developers; there is also an online demo. New to this? Start here.
Can I run it?
- Cost
- FreeNothing to pay or sign up for.
- Runs on
- Web browser, Server
- Computer
- An ordinary computer is fine
- Privacy
- Runs on your own device: your data stays with you
- API key
- Not needed
Try it
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (MIT): Very permissive: free to use, change and share, including for business.
- More on staying safe