Added Nov 5, 2026
NSFWJS
FreeOpen-source JavaScript library that flags NSFW images on the device
What is NSFWJS?
NSFWJS is a free MIT-licensed JavaScript library that classifies images as neutral, drawing, sexy, hentai or porn using a TensorFlow.js model. Developers add it to web, Node.js or React Native apps to moderate uploads without sending images to a server.
After installing it from npm alongside TensorFlow.js, you load the model and call classify on an image element to get probabilities for each of the five classes. Backends include WebGL, WebGPU, WASM and Node, and the model files can be self-hosted instead of fetched from a CDN.
Three models are offered: the default MobileNetV2 at about 2.6 MB and roughly 90% accuracy, a mid-sized MobileNetV2 variant near 93%, and a larger InceptionV3 model. The project is maintained by Gant Laborde at Infinite Red, with a live demo and a mobile demo on GitHub.
Features
- Five-class image classification
- Runs in browser or Node.js
- WebGL, WebGPU and WASM backends
- Self-hostable models
- React Native support
Tags
Releases
+ Submit new release- Listed
NSFWJS was added to the directory.
Organization
Infinite Red
🇺🇸 United States
Listed by kitio.ai · unverified owner
Pricing
- Pricing model
- Free
- Paid options from
- 100% free
Sponsored
Your AI tool here
A Featured launch puts your tool in this spot and on the home page for a week.
Top NSFWJS alternatives
View allCoding
Beginner-friendly JavaScript library for machine learning in the browser
Coding
Free open-source editor with built-in AI agents for coding
Coding
Open-source, model-agnostic coding agent for the terminal
Coding
Open standard for connecting AI apps to tools, data and workflows
Compare NSFWJS
If you liked NSFWJS
Open-source coding agent for VS Code and the terminal
Freemium · $9.99/moCoding1 views1 clicks to the websiteMade in United StatesFast Rust code editor with built-in AI agents and edit predictions
Freemium · $10/moCoding2 clicks to the websiteMade in United StatesAI-generated wikis and Q&A for any public GitHub repo
FreeCoding29 views19 clicks to the websiteMade in United StatesOpen-source Python framework for building conversational AI apps
FreeCoding12 views10 clicks to the websiteOpen-source local AI agent for code and other tasks
FreeCoding6 views5 clicks to the websiteMade in United States
Pros and cons
Pros
- Images never leave the device
- Small default model
- Free under the MIT license
Cons
- Around 90% accuracy on the small model
- Only five fixed categories
- Images only, no video or text
Prompts & results
No prompts yet. Add your own prompt and output to help others use this tool.
Share a prompt
Reviews
Q&A
What is NSFWJS?
NSFWJS is a free MIT-licensed JavaScript library that classifies images as neutral, drawing, sexy, hentai or porn using a TensorFlow.js model. Developers add it to web, Node.js or React Native apps to moderate uploads without sending images to a server.
Does NSFWJS upload images to a server?
No. Classification runs locally with TensorFlow.js in the browser or in Node.js, so images stay on the device.
Can NSFWJS be used in a mobile app?
Yes. The project publishes a React Native demo showing how to run it in a mobile app.
How much does NSFWJS cost?
NSFWJS is 100% free.
Is there a free version of NSFWJS?
Yes. NSFWJS is completely free to use.
What are the main features of NSFWJS?
Five-class image classification, Runs in browser or Node.js, WebGL, WebGPU and WASM backends, Self-hostable models, React Native support.
Who makes NSFWJS?
NSFWJS is made by Infinite Red.
What are the best alternatives to NSFWJS?
Popular alternatives include ml5.js, Visual Studio Code, OpenCode.