Developer framework

NSFWJS

Visit website

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.

ProductPrice / unitFree allowanceInput → outputKey limit
NSFWJSRead profileOfficial source ↗MIT; no per-image library chargeSource and bundled modelsImage pixels become class scores.Requires TensorFlow.js integration.
NudeNetOfficial source ↗Open-source package; compute separateLocal package, no hosted API quotaImages become labeled detected regions.Python and ONNX runtime integration.
OpenNSFW2Official source ↗MIT code; your runtime costsOpen-source image-scoring implementationAn image becomes an NSFW probability.Python/Keras setup replaces browser JS.

Setup & workflow

  1. Add the library and TensorFlow.js, then choose a backend supported by the target devices.
  2. Load the bundled model or serve reviewed model files from your own static host.
  3. Reuse the loaded model, dispose unused tensors and validate the review threshold.
Requirements & installation
    npm install nsfwjs @tensorflow/tfjs

    Limits & 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.