Skip to content
DevToolKit

Text Classifier

Classify text into categories using keyword-based scoring with preset classifiers for spam, sentiment, topic, support tickets, and content type. Custom labels supported — fully client-side.

0 words
Spam (21 keywords)Promotional (18 keywords)Legitimate (19 keywords)

Enter text and select a preset or create custom categories to classify

Was this tool helpful?

How to Use

Classify text into categories in three steps:

  1. Select a classifier — Choose a built-in preset (Spam Detection, Sentiment, Topic, Support Ticket, Content Type) or click "Custom" to define your own categories with comma-separated keywords.
  2. Paste your text — Enter any text to classify. Click a sample button to try pre-loaded examples. Toggle between single-label mode (one winner) and multi-label mode (independent scoring).
  3. Review results — See the top category with confidence bars for all categories. Matched keywords are shown beneath each bar. Copy the classification summary with the clipboard button.

About This Tool

Keyword-Based Classification

The classifier scores text against each category by counting keyword matches. Multi-word phrases (like "machine learning" or "click here") receive higher weight than single words, since multi-word matches are more indicative of the target category. Scores are normalized by text length to ensure fair comparison regardless of document size.

In single-label mode, raw scores are passed through a softmax function that produces a probability distribution summing to 100%. This is appropriate when categories are mutually exclusive (e.g., an email is either spam or not). In multi-label mode, each category's score is independently transformed via sigmoid, allowing text to belong to multiple categories simultaneously — for example, a support ticket about a billing bug would score high on both "Billing" and "Technical."

Built-in Presets

Five curated presets cover common classification tasks. Spam Detection uses 50+ spam, promotional, and business keywords. Sentiment covers positive, negative, and neutral emotional vocabulary. Topic classifies into technology, finance, health, sports, and politics. Support Ticket routes into billing, technical, feature request, and account categories. Content Type distinguishes news, opinion, academic, and tutorial writing styles.

Accuracy and Limitations

Keyword-based classification is transparent and predictable — the matched terms are always visible, so you can understand exactly why a classification was made. However, it cannot capture context, synonyms, or implied meaning. A sentence like "this product is not bad" would match "bad" in the negative category despite being positive. For context-aware classification, zero-shot NLI models are needed. For sentiment analysis with negation handling, see Sentiment Analyzer.

Why Use This Tool

Instant Browser-Side Classification

All classification runs in your browser with zero latency. Keyword lists total approximately 2KB. Processing is instantaneous for text of any length. No API keys, no rate limits, no ML model downloads. Custom categories take effect immediately.

Common Use Cases

  • Email triage: Quickly classify incoming emails as spam, promotional, or legitimate business correspondence. Useful for testing email filtering rules.
  • Support ticket routing: Determine whether a customer message is about billing, technical issues, feature requests, or account management.
  • Content moderation: Pre-screen user-generated content by topic or content type before human review.
  • Research coding: Apply consistent category labels to survey responses, interview transcripts, or review text for qualitative research.
  • SEO content audit: Verify that page content matches its intended topic category by checking keyword density per category.

Privacy

100% client-side. Your text never leaves your browser. Related tools: Sentiment Analyzer, Keyword Extractor, Text Similarity Checker, and Readability Analyzer.

FAQ

How does the classification work?
Each category has a set of associated keywords and phrases. The classifier scans your text for matches, weights multi-word phrases higher than single words, and normalizes by text length. In single-label mode, scores are passed through softmax to produce probabilities summing to 100%. In multi-label mode, each category is scored independently via sigmoid.
What presets are available?
Five built-in presets: Spam Detection (spam/promotional/legitimate), Sentiment (positive/negative/neutral), Topic (technology/finance/health/sports/politics), Support Ticket (billing/technical/feature request/account), and Content Type (news/opinion/academic/tutorial). Each preset has curated keyword lists.
Can I create custom categories?
Yes. Click 'Custom' to define your own categories. Add a category name and list keywords separated by commas. You can have up to 10 custom categories. Keywords can be single words or multi-word phrases — phrases are weighted more heavily.
What is single-label vs multi-label mode?
Single-label mode forces all probabilities to sum to 100% (softmax normalization), implying the text belongs to exactly one category. Multi-label mode scores each category independently (sigmoid), allowing text to belong to multiple categories simultaneously — useful when categories overlap.
Is my text sent to a server?
No. All classification runs entirely in your browser. The keyword lists are embedded in the page code. No text is transmitted over the network.