AI Emotion Detector

100% private — runs on your device, never uploaded. Works offline once loaded.

Paste any text and this tool reads the emotions behind it — joy, sadness, anger, fear, love or surprise — and shows how strongly each one comes through. A compact AI model runs entirely in your browser, so your words are never uploaded to a server.

What this tool does

The AI Emotion Detector reads a passage of text and estimates which emotions it expresses. Instead of a simple positive/negative verdict, it distributes confidence across six emotions — joy, sadness, anger, fear, love and surprise — so you can see the emotional texture of a message.

Results are shown as ranked horizontal bars, with the strongest emotion highlighted at the top. This makes it easy to compare, for example, a note that mixes anger and fear versus one that is mostly joyful.

The model

Under the hood it uses Xenova/distilbert-base-uncased-emotion, a DistilBERT text-classification model fine-tuned on an emotion-labelled dataset. It runs through transformers.js directly in your browser via WebAssembly, with no backend involved.

The model is quantized to keep the download small (~65 MB) and is cached after the first load, so repeat runs are quick and work even offline.

Good uses

It is handy for triaging support messages, gauging the tone of reviews or survey responses, studying the emotional arc of your own writing, or teaching and experimenting with NLP.

  • Sort feedback by emotional intensity
  • Check the tone of an email before sending
  • Explore how a story or lyric reads emotionally
  • Prototype emotion-aware features privately

Quality and privacy caveats

Because everything runs on-device, nothing you type is uploaded or logged. That privacy comes with the trade-offs of a small model: it works best on clear English sentences and can miss sarcasm, mixed feelings or context that spans multiple messages.

Treat the scores as a helpful signal rather than a definitive judgement, and read the highest-confidence emotions together rather than fixating on a single percentage.

Frequently asked questions

Is the emotion detector free?

Yes. It is completely free and runs in your browser with no account, sign-up or usage limits.

Does it work offline?

After the one-time model download, yes. The model is cached, so you can detect emotions without an internet connection.

What language does it support?

It is trained on English text and works best there. Other languages may return unreliable results.

Can it detect sarcasm or mixed emotions?

Only partly. It reports a spread of emotions, which can hint at mixed feelings, but sarcasm and subtle irony often fool small models.

Why do the scores not always add up to 100%?

The model scores each emotion independently, so the ranked bars show relative strength rather than a single split of a whole.

Is my data stored anywhere?

No. There is no upload and no server-side storage — the analysis happens entirely on your device.

Advertisement