Language Detector
Paste a sentence or a paragraph and see which language it is most likely in, how confident the detector is, and which languages came close. It recognizes 59 languages — by their writing system where that settles it, and by patterns of letters where several languages share an alphabet. Runs in your browser; free, no sign-up.
Detection runs in your browser as you type — nothing is sent anywhere.
Type or paste some text to see which language it is most likely in.
How to Use the Language Detector
- Paste the text. A sentence is enough for most languages; two or three are better when the language has a close relative.
- Read the answer. The detector updates as you type and shows the most likely language, its confidence, and the script it is written in.
- Check the runners-up. When a second language scores close behind the first, the text is too short or too mixed to separate them — add more if you can.
- Mind the notes. A warning appears when the text is very short or mixes scripts, the two situations where the answer is least reliable.
How the Detector Works
Identification happens in two steps. First, every letter is assigned its Unicode script. Thirteen scripts belong to a single supported language — Greek, Hebrew, Thai, and Korean Hangul among them — so for those the script is the answer. Japanese is recognized by its kana, and Chinese by its characters alone, with a check of common characters that are written differently in Simplified and Traditional Chinese.
Latin, Cyrillic, Arabic, and Devanagari are each shared by several languages, and there the detector compares letter patterns. Following the method of Cavnar and Trenkle's 1994 paper on n-gram text categorization, each language is represented by its 400 most frequent character trigrams — sequences of three characters, such as the, ing, or de at the start of a word. The trigrams of your text are scored against each profile, frequent ones counting most, and the scores are turned into probabilities. On a near tie, a short text leans toward the more widely used language.
The profiles were built from translations of the Universal Declaration of Human Rights collected by the UDHR in Unicode project, using the public-domain copy in the NLTK data collection. Only the trigram rankings are stored — about 70 KB in all — so detection runs in your browser and your text is never uploaded.
Worked example
Ukrainian sample
Дослідження показує, що сон покращує пам'ять студентів. → Ukrainian 86%, then Russian 14%
Portuguese sample
A pesquisa mostra que o sono melhora a memória dos estudantes. → Portuguese 96%, then Spanish 4%
Both answers are right, and the runners-up show why the confidence is not 100%: Ukrainian and Russian share most of their letters and many words, as do Portuguese and Spanish. Add a second sentence to either text and the confidence rises to 99%, the highest the detector displays.
Supported Languages
| Identified by | Languages |
|---|---|
| Script alone (13) | Amharic, Armenian, Bengali, Chinese (Simplified and Traditional), Georgian, Greek, Gujarati, Hebrew, Japanese, Korean, Punjabi (Gurmukhi), Tamil, Thai |
| Latin-script patterns (34) | Afrikaans, Albanian, Basque, Catalan, Croatian, Czech, Danish, Dutch, English, Estonian, Filipino, Finnish, French, German, Hungarian, Icelandic, Indonesian, Irish, Italian, Latin, Latvian, Lithuanian, Norwegian (Bokmål), Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish, Swahili, Swedish, Turkish, Vietnamese, Welsh |
| Cyrillic patterns (6) | Belarusian, Bulgarian, Kazakh, Russian, Serbian, Ukrainian |
| Arabic-script patterns (3) | Arabic, Persian, Urdu |
| Devanagari patterns (3) | Hindi, Marathi, Nepali |
Languages without a profile are reported as their closest supported relative: Malay as Indonesian, Galician as Portuguese or Spanish, Macedonian as Bulgarian or Serbian, Serbian in Latin script as Croatian, and Yiddish as Hebrew.
How Accurate Is It?
Length matters more than anything else. We tested the shared-script languages on snippets held back from the training text, and separately on paragraphs from this site's own translated guides, which are a different kind of writing and often quote English titles:
| Snippet length | Held-out UDHR text | Translated guides, Latin script | Translated guides, Russian |
|---|---|---|---|
| 30 characters | 96.8% | 82% | 90% |
| 60 characters | 99.2% | 90% | 94% |
| 120 characters | 99.8% | 95% | 96% |
Most errors fall between close relatives: Norwegian and Danish, Czech and Slovak, Croatian and Slovenian, Afrikaans and Dutch, Bulgarian and Russian, and Portuguese, Spanish, and Catalan. Text that is mostly names, numbers, citations, or technical terms carries little evidence of any language, and a passage that switches languages is labelled by the one with the most text.
Frequently Asked Questions
- How much text does the detector need?
- One full sentence — 60 characters or more — is usually enough, and two or three sentences are reliable even for close relatives. Single words are a guess: Hello fits several European languages almost equally well, and the detector says so with a low confidence and a warning.
- What does the confidence percentage mean?
- It is the probability the model assigns to its top answer, calibrated on held-out text so that the numbers mean roughly what they say: of answers given with 80% confidence, about four in five were right in testing. For languages identified by their script it shows that the script alone settles the question.
- Why does it confuse Danish and Norwegian, or Czech and Slovak?
- Because their written forms really are close. Norwegian Bokmål grew out of written Danish, and Czech and Slovak share most of their vocabulary and spelling. Short passages may contain no word or letter pattern that only one of the pair uses; longer ones almost always do.
- Can it detect several languages in one text?
- No — it gives one answer for the whole text. If a passage mixes scripts, it is labelled by the main script and a note shows what share of the letters that is. To check a quotation inside a longer text, paste the quotation on its own.
- Is my text uploaded?
- No. The language profiles are part of the page, and both the script check and the trigram scoring run in your browser. Nothing you paste is sent to CitationEasy or to anyone else.
- Why is my language missing?
- The detector covers 59 languages, chosen for how widely they are used and for having a reliable training text. A missing language is reported as its nearest supported relative — Malay as Indonesian, Galician as Portuguese — or, if it uses a script of its own that is not covered, as no answer at all.
- How do I cite a source written in another language?
- Once you know the language, cite the work in its original language and add a translation of the title in square brackets where your style asks for one. How to Cite a Source in Another Language covers APA, MLA, and Chicago.