T
ToolboxKit

AI Text Classifier

Analyze text sentiment in your browser with AI. Get positive/negative classification and confidence scores using a local DistilBERT model.

Ad
Ad

About AI Text Classifier

This AI text classifier runs a real machine learning model directly in your browser to determine whether text expresses positive or negative sentiment. No server calls, no API keys, and no data leaves your device.

Browser-based AI inference

The tool uses Transformers.js to run a DistilBERT model that was fine-tuned on the Stanford Sentiment Treebank (SST-2). On first use, the ~67 MB model downloads and is cached by your browser. After that, analysis runs locally in seconds. If you work with language models regularly, pair this with the AI token counter to understand how tokenizers break text apart.

Confidence scores and batch analysis

Each analysis returns both a sentiment label and confidence scores for positive and negative. The visual confidence bars make it easy to see how certain the model is. For bulk analysis, paste multiple texts on separate lines and analyze them all in one click.

Use cases

This tool is useful for quickly checking the tone of customer reviews, social media posts, support tickets, or any short English text. It can help you spot patterns before diving into a full analysis. For comparing the cost of running models like this at scale via API, check out the AI pricing calculator.

Everything runs client-side using WebAssembly and ONNX Runtime, so your text stays completely private.

Frequently Asked Questions

Does this tool send my text to a server?

No. The entire AI model runs in your browser. Your text never leaves your device. The model file is downloaded once from a CDN and cached locally for future visits.

Why does the first analysis take so long?

On first use, the tool downloads a ~67 MB machine learning model. This only happens once. Your browser caches the model, so subsequent visits load it from the cache almost instantly.

What model does this tool use?

It uses DistilBERT fine-tuned on the SST-2 dataset, a well-known English sentiment benchmark. The model was converted to run in browsers via Transformers.js by Xenova.

Can I analyze text in languages other than English?

The model was trained on English text, so it works best with English input. Results for other languages may be unreliable. For non-English sentiment analysis, a multilingual model would be needed.

How does batch mode work?

Put each text on a separate line in the input box and click Analyze. The tool runs sentiment analysis on each line individually and shows all results at once.