Language Detector

Paste a snippet and get its language, its script, the next best guesses and an honest confidence label.

Paste any snippet of text and this tool names its language and script, with the next best guesses and a confidence label. It works in two steps. First it counts which script the letters belong to, using Unicode block ranges: Arabic, Cyrillic, Greek, Hebrew, Devanagari, Hangul, Hiragana, Katakana, Han and more. Then, for scripts shared by several languages, it scores the words against short lists of common words for each language. Nothing is uploaded: the whole check runs in your browser.

Honest limits. This is a word-list check, not a trained language model, so it is honest about its weak spots. Short texts are unreliable: three words can match several languages at once, and the tool says Low confidence instead of guessing loudly. Languages that share a script and much of their vocabulary are easy to mix up, above all Spanish and Portuguese, and Danish and Norwegian, and Indonesian and Malay. Chinese characters are shared across Chinese varieties and Japanese kanji, so a text with Han characters and no kana is reported as Chinese with a note, not as Simplified or Traditional. Arabic script is shared by Arabic, Persian and Urdu, so that call rests on distinctive letters and words, and mixed text scores lower.

How the check works, in order

Step one is the script. Unicode groups characters into blocks by script, and the tool counts letters per block: Arabic is U+0600 to U+06FF with its supplement and extended blocks, Cyrillic is U+0400 to U+04FF plus its supplement, Greek is U+0370 to U+03FF, Hebrew is U+0590 to U+05FF, Devanagari is U+0900 to U+097F, Hiragana is U+3040 to U+309F, Katakana is U+30A0 to U+30FF, Hangul is U+AC00 to U+D7AF with its jamo blocks, and Han ideographs sit at U+4E00 to U+9FFF with Extension A at U+3400 to U+4DBF. When one script covers almost all the letters, the language is often settled at this step: Hangul means Korean, Thai script means Thai, Hebrew script means Hebrew.

Step two is the word list, and it only runs where it is needed. Latin script covers English, French, Spanish, German, Italian, Portuguese, Dutch, Turkish, Polish, Swedish, Norwegian, Danish, Finnish, Czech, Romanian, Indonesian and Vietnamese, so the tool scores the text against a short list of common words for each: the, and, of for English, le, la, les, de for French, el, la, los, de for Spanish, der, die, das, und for German, and so on. Distinctive letters add a small bonus, such as ñ for Spanish, ã and õ for Portuguese, ß for German, and ğ and ş for Turkish. Cyrillic text is scored the same way for Russian, Ukrainian, Bulgarian and Serbian, and Arabic-script text for Arabic, Persian and Urdu. The winner is the language with the highest score, the runner-up is shown beside it, and the confidence label follows the gap between them and the length of the text.

When to trust it, and when not to

Trust a High result on a full paragraph in one language. Treat a Low result as a hint, not an answer, and paste more text. A text that mixes two languages, a list of names, or a snippet made of numbers and proper nouns has too little signal for any word list, and the tool says so instead of picking a winner with false confidence.

Why common words, not rare ones

Rare words are the ones a writer borrows from other languages, so they mislead. Common words, the, of, and, and their equivalents, appear in almost every sentence and are rarely borrowed, so a short list of them separates languages fast. That is also why the tool needs real sentences: a single word such as "bank" exists in English, Dutch and several other languages unchanged.

Frequently Asked Questions

In two steps. First the tool counts which Unicode script the letters belong to, using block ranges such as Arabic U+0600 to U+06FF and Cyrillic U+0400 to U+04FF. Then, for scripts shared by several languages, it scores the words against short lists of common words for each language, and the highest score wins.
Because three or four words can match several languages at once, and a single word such as bank exists unchanged in English, Dutch and other languages. The tool needs real sentences: it reports Low confidence under about 10 words instead of guessing loudly.
Because the two languages share most of their common words and grammar, and short texts often contain no word that separates them. Distinctive letters help, such as ñ for Spanish and ã or õ for Portuguese, but a short neutral sentence can still go either way. The runner-up score on the page shows how close the call was.
No, and it does not pretend to. Han characters are shared across Chinese varieties and Japanese kanji, so a text with Han characters and no kana is reported as Chinese, with a note that the variety is not distinguished. Japanese is identified when hiragana or katakana is present.
All three use Arabic script, so the call rests on distinctive letters and words: Persian uses پ, چ, ژ and گ, Urdu uses ٹ, ڈ, ڑ and ھ and its own common words, and Arabic has its own set. Mixed or short Arabic-script text scores lower, and the page says so.
No. The script count and the word scoring run in your browser. Nothing is sent to a server.

Related Tools

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools