---
title: "Language Detector - Identify Text Privately | CanDoYa"
description: "Identify the language of text with private on-device AI. Compare the top three matches across 20 languages with no text upload or sign-up."
url: https://candoya.com/tools/language-detector/
locale: en
type: browser-tool
---

# AI Language Detector

Category: Social & Creator

## What is a language detector?

A language detector identifies the most likely language of pasted text. This tool compares your sample against 20 languages and shows the top three model scores. The AI runs locally in a browser worker, so your text is not uploaded, although the model must download on the first use.

**The detector runs an XLM-R classification model on your device** and keeps the page responsive by doing inference in a worker. It prefers WebGPU acceleration and retries on the WebAssembly CPU backend when needed. The first run downloads about 296 MB of model and tokenizer data from Hugging Face. Browsers normally cache those files, but may remove them when storage is cleared or space is low.

The model compares Arabic, Bulgarian, Chinese, Dutch, English, French, German, Greek, Hindi, Italian, Japanese, Polish, Portuguese, Russian, Spanish, Swahili, Thai, Turkish, Urdu, and Vietnamese. Text in another language is forced toward one of those labels, so check the supported list before relying on a result.

## How to use it

1. **Paste a useful sample** - Enter a full sentence or paragraph in one of the 20 supported languages. Longer, natural text is usually easier to distinguish than a name or single word.
2. **Run on-device detection** - Click Detect language. On the first run, wait for the model download; later visits can reuse the browser cache when it is still available.
3. **Review the ranked matches** - Check the top language, ISO code, score, and alternatives. Treat close scores, short samples, and unsupported languages as uncertain.

## Who it's for

- **Support teams** routing an unfamiliar customer message to the right language queue before a human reads it.
- **Researchers and editors** sorting multilingual excerpts while keeping unpublished text on their own device.
- **Developers** checking sample data before choosing a locale, tokenizer, translation model, or content pipeline.
- **Travellers and language learners** identifying a sentence before looking up a dictionary or translation resource.

## Expert note

Language identification is a closed-set classification task here: the model must choose among its 20 training labels. A high score can still be wrong for an unsupported language, while names, URLs, code, transliterated text, and mixed-language sentences often lack enough distinctive evidence. Use a natural paragraph when the decision matters.

## Frequently asked questions

### Is my text uploaded to a server?

No. The text is passed to a worker inside your browser and inference happens on your device. The worker downloads public model files and the Transformers.js runtime from external hosts, but it does not send your pasted text with those requests. CanDoYa does not receive or store the sample.

### Is the language detector free?

Yes. There is no account, payment, credit limit, or API key. Your device performs the inference. The practical costs are a first model download, local storage, memory, and processing time. A metered internet connection may still charge for downloading the model files.

### How much text can I analyse?

You can paste any ordinary passage, but the detector analyses at most the first 400 characters to stay within the model's input window and keep browser inference predictable. Four letters or numbers are the minimum. For a useful result, provide at least one natural sentence; a paragraph gives the model more distinguishing patterns.

### Which languages can this tool identify?

The model supports 20 labels: Arabic, Bulgarian, Chinese, Dutch, English, French, German, Greek, Hindi, Italian, Japanese, Polish, Portuguese, Russian, Spanish, Swahili, Thai, Turkish, Urdu, and Vietnamese. It does not reliably identify languages outside that closed set.

### Why is the first download about 296 MB?

The detector uses a multilingual XLM-R neural model rather than a small character-frequency table. Its quantized ONNX weights are about 279 MB and its tokenizer is about 17 MB. The browser normally caches both, although cache eviction, private browsing, or cleared site data can require another download.

### Does language detection work without WebGPU?

Yes. The worker prefers WebGPU when the browser exposes it. If WebGPU is missing or model startup fails, the tool retries with the WebAssembly CPU backend. CPU inference keeps the same text on your device, but loading and detection can take longer on phones or older computers.

### What do the confidence scores mean?

The scores rank the model's 20 possible labels for this sample. They are useful for comparing candidates but are not a guarantee, an independent probability of correctness, or evidence that the true language is supported. Close top scores are a reason to add more natural text.

### Can it detect mixed or transliterated text?

The tool returns one dominant top match plus alternatives, not a language label for every sentence or word. Mixed-language text can produce close scores. Informal transliteration, names, emoji, URLs, and source code also remove many script and spelling clues, so those inputs need cautious human review.

## Related tools

- [Sentiment Analysis](https://candoya.com/tools/sentiment-analysis/)
- [Text Classifier](https://candoya.com/tools/text-classifier/)
- [Text Summarizer](https://candoya.com/tools/text-summarizer/)
- [Keyword Extractor](https://candoya.com/tools/keyword-extractor/)
- [Speech to Text](https://candoya.com/tools/speech-to-text/)

---

*Markdown edition of <https://candoya.com/tools/language-detector/>, published for AI agents and other automated readers. Index of key pages: <https://candoya.com/llms.txt>.*
