NSFW JS is an open-source JavaScript library that brings NSFW image detection to the client side. Built on TensorFlow.js, it runs entirely in the browser, eliminating the need for server calls and preserving user privacy. The library uses a pre-trained convolutional neural model to classify images into categories like drawing, hentai, neutral, porn, and sexy. It's designed for ease of integration: simply include the script, load the model, and classify images with a single function call. Performance is optimized for modern browsers, with fallbacks for older ones. NSFW JS is perfect for web applications that handle user-generated content, such as forums, social media platforms, messaging apps, or dating sites. By detecting inappropriate images client-side, you can instantly block uploads, blur images, or flag content without imposing server costs or latency. Additionally, the library is highly customizable—developers can fine-tune confidence thresholds or extend the model for specific needs. With no external dependencies beyond TensorFlow.js, NSFW JS is a streamlined solution for content moderation that respects user data and scales effortlessly.
Web developers, content moderators, and platform owners who need to automatically detect and filter NSFW images in client, side applications.