NSFWJS
Assess NSFWJS for browser-side image classification, including TensorFlow.js setup, model delivery and the need to calibrate review thresholds on your own content.
- Starting price
- No software license fee
- Free access
- MIT-licensed code
- Billing unit
- Your compute and model delivery
- Platform
- JavaScript browser or Node.js
- Verified
- 19 Oct 2026
Overview
What you provide
- Provide an image, canvas, video frame or tensor through the supported JavaScript API.
What you get
- The classifier returns class names with probabilities for your application to evaluate.
Choosing this tool
Choose NSFWJS when an application needs a local first-pass image signal without uploading each image to a remote classification service. It returns probabilities for five classes, not a final policy decision. NudeNet is a region-detection alternative, while OpenNSFW2 is a Python route to whole-image scoring.
A decision worked through
For 1,000 images in a browser session, the library’s per-call fee remains zero. Load and reuse the model instead of downloading it for each image; measure runtime and false positives on representative devices before deciding whether the browser route is suitable.
NSFWJS alternatives for this task
NSFWJS alternatives are compared by runtime and output granularity: browser probabilities, detected regions or a Python image score require different integration and review logic.
| Product | Price / unit | Free allowance | Input → output | Key limit |
|---|---|---|---|---|
| NSFWJSRead profileOfficial source ↗ | MIT; no per-image library charge | Source and bundled models | Image pixels become class scores. | Requires TensorFlow.js integration. |
| NudeNetOfficial source ↗ | Open-source package; compute separate | Local package, no hosted API quota | Images become labeled detected regions. | Python and ONNX runtime integration. |
| OpenNSFW2Official source ↗ | MIT code; your runtime costs | Open-source image-scoring implementation | An image becomes an NSFW probability. | Python/Keras setup replaces browser JS. |
Setup & workflow
- Add the library and TensorFlow.js, then choose a backend supported by the target devices.
- Load the bundled model or serve reviewed model files from your own static host.
- Reuse the loaded model, dispose unused tensors and validate the review threshold.
Requirements & installation
npm install nsfwjs @tensorflow/tfjsLimits & review
- Install nsfwjs with its TensorFlow.js peer dependency. Browser backends include WebGL, optional WebGPU or WASM; Node.js can use tfjs-node. No universal memory or accuracy guarantee is established for your device or dataset.
Your part
- Calibrate thresholds on a labeled sample and route uncertain cases to a human reviewer.
Sources & verification5
This profile is based on official sources, not a hands-on product test.
Vendor descriptions and demos document advertised features. Editorial guidance is based on these sources.
- Official productnsfwjs.com
- Official pricing and limitsgithub.com
- NSFWJS official referencegithub.com
- NudeNet official referencepypi.org
- OpenNSFW2 official referencegithub.com