Language Detector

Paste any text to see its language, a confidence score, the top-3 candidates, ISO 639-1 and 639-3 codes and the writing system. Mixed text can be split sentence by sentence. 96 languages, processed locally in your browser.

Use the Language Detector

Sample Texts

How the detection works

  1. Script. Each letter is matched to a Unicode script. A script used by one language (Greek, Hangul, Thai, Georgian, Armenian, Tamil…) decides the language directly; any kana in Han text means Japanese.
  2. Trigrams. The text is lower-cased, punctuation and digits are dropped, and every three-character sequence is counted: "the cat" gives " th", "the", "he ", "e c", " ca", "cat", "at ".
  3. Distance. Each trigram is looked up in every language profile of that script (the 300 most frequent trigrams, ranked). Known trigrams add their rank difference; unknown ones add a 300 penalty. Common function words found in the text subtract from a language's distance, mainly helping short phrases.
  4. Probability. The smallest distance wins. Distances are converted to relative probabilities (softmax), which gives the confidence and the top-3 list.

Example: "Wo ist der nächste Bahnhof?" has 26 trigrams. On trigrams alone Afrikaans and Dutch score close to German, but "wo", "ist" and "der" are German function words, so German wins. Longer text rarely needs this help.

Supported languages (96)

ISO 639-3 code as used by the trigram models, ISO 639-1 / BCP 47 tag for HTML lang attributes.

Language ISO 639-1 ISO 639-3 Script
Afrikaans af afr Latin
Albanian sq als Latin
Amharic am amh Ethiopic
Arabic ar arb Arabic
Armenian hy hye Armenian
Azerbaijani az azj Latin
Belarusian be bel Cyrillic
Bengali bn ben Bengali
Bosnian bs bos Latin
Bulgarian bg bul Cyrillic
Burmese my mya Myanmar
Catalan ca cat Latin
Cebuano ceb ceb Latin
Chichewa (Nyanja) ny nya Latin
Chinese (Mandarin) zh cmn Han (CJK)
Croatian hr hrv Latin
Czech cs ces Latin
Danish da dan Latin
Dari fa-AF prs Arabic
Dutch nl nld Latin
English en eng Latin
Esperanto eo epo Latin
Estonian et ekk Latin
Finnish fi fin Latin
French fr fra Latin
Galician gl glg Latin
Georgian ka kat Georgian
German de deu Latin
Greek el ell Greek
Gujarati gu guj Gujarati
Haitian Creole ht hat Latin
Hausa ha hau Latin
Hebrew he heb Hebrew
Hindi hi hin Devanagari
Hungarian hu hun Latin
Igbo ig ibo Latin
Indonesian id ind Latin
Italian it ita Latin
Japanese ja jpn Kana (Japanese)
Javanese jv jav Latin
Kannada kn kan Kannada
Kazakh kk kaz Cyrillic
Khmer km khm Khmer
Kinyarwanda rw kin Latin
Korean ko kor Hangul
Kyrgyz ky kir Cyrillic
Lao lo lao Lao
Latvian lv lvs Latin
Lingala ln lin Latin
Lithuanian lt lit Latin
Macedonian mk mkd Cyrillic
Malagasy mg plt Latin
Malay ms zlm Latin
Malayalam ml mal Malayalam
Marathi mr mar Devanagari
Mongolian mn khk Cyrillic
Nepali ne npi Devanagari
Norwegian Bokmål nb nob Latin
Norwegian Nynorsk nn nno Latin
Pashto ps pbu Arabic
Persian (Farsi) fa pes Arabic
Polish pl pol Latin
Portuguese pt por Latin
Punjabi pa pan Gurmukhi
Romanian ro ron Latin
Russian ru rus Cyrillic
Serbian sr srp Latin + Cyrillic
Shona sn sna Latin
Sinhala si sin Sinhala
Slovak sk slk Latin
Slovenian sl slv Latin
Somali so som Latin
Spanish es spa Latin
Sundanese su sun Latin
Swahili sw swh Latin
Swedish sv swe Latin
Tagalog (Filipino) fil tgl Latin
Tajik tg tgk Cyrillic
Tamil ta tam Tamil
Tatar tt tat Cyrillic
Telugu te tel Telugu
Thai th tha Thai
Tibetan bo bod Tibetan
Tigrinya ti tir Ethiopic
Turkish tr tur Latin
Turkmen tk tuk Latin
Ukrainian uk ukr Cyrillic
Urdu ur urd Arabic
Uyghur ug uig Arabic
Uzbek uz uzn Latin
Vietnamese vi vie Latin
Wolof wo wol Latin
Xhosa xh xho Latin
Yiddish yi ydd Hebrew
Yoruba yo yor Latin
Zulu zu zul Latin

Trigram profiles: franc 6.2 (MIT licence), trained on the Universal Declaration of Human Rights.

Summary

The detector first finds the writing system (script) from Unicode ranges. Scripts used by one language — Greek, Korean Hangul, Thai, Georgian, Armenian, Tamil and others — identify the language directly; Japanese is recognised by its kana even when kanji dominate. For shared scripts (Latin, Cyrillic, Arabic, Devanagari, Hebrew, Ethiopic) it compares the text's character trigrams with frequency profiles of each language (the open-source franc models) and adds a small boost for common function words, which helps with short phrases. Distances are turned into relative probabilities, so the top-3 percentages add up to about 100%. Closely related pairs such as Indonesian/Malay, Danish/Norwegian, Czech/Slovak, Persian/Dari and Bosnian/Croatian/Serbian need longer text to separate.

How it works

  1. Paste or type text into the input box — detection starts automatically.
  2. Read the detected language, its native name, ISO codes and confidence percentage.
  3. Check the top-3 candidates; close percentages mean the text is short or the languages are related.
  4. Turn on "Detect each sentence" for documents that mix languages.
  5. Use the sample buttons to see how different scripts and languages are recognised.

Use cases

  • Translators identifying source-language documents before starting work
  • Content moderators screening user-submitted text for language compliance
  • Linguists and researchers analyzing multilingual datasets
  • Developers checking which language tag (ISO 639-1 / BCP 47) to assign to content
  • Travellers working out what language a sign, menu or message is written in

Frequently Asked Questions

Last updated: 2026-10-10 · Reviewed by Nham Vu