Language Detector
Paste any text and see its language with a confidence score, the next most likely languages, the scripts used and a sentence-by-sentence view of mixed text.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Paste the text
Paste it or open a text, subtitle or HTML file.
- 2Read the main language
See the language, code, script and confidence.
- 3Check the runners-up
Compare the scores of the next most likely languages.
- 4Look at the scripts
See the share of Latin, Cyrillic, Arabic or other letters.
- 5Find mixed passages
Use the sentence view and set the minimum words per sentence.
- 6Switch engine or export
Load franc for 187 languages, or export the sentence results as CSV.
About this tool
Identifying the language of a piece of text is the first step for translating it, routing a support email, tagging content for search engines with the right lang attribute, choosing a spell checker or sorting survey answers. This detector works in two stages. First every letter is assigned to its Unicode script: Latin, Cyrillic, Greek, Arabic, Hebrew, Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Georgian, Armenian, Ethiopic, Khmer, Hangul, kana and Han characters, among others. Many scripts belong to a single language, so a text in Thai or Georgian letters is identified at once. Where several languages share a script, a second stage scores the text against profiles of the most common short words in each language together with letters that only some languages use, such as ñ, ß, ø, ő, ł, ș or ğ in Latin script, і and ї for Ukrainian or ў for Belarusian in Cyrillic, and پ, ٹ or ښ for Persian, Urdu or Pashto in Arabic script. Japanese is recognised by its kana, and Chinese is labelled simplified or traditional by checking characters that differ between the two. The built-in engine covers about 80 languages and answers instantly, even offline. For harder cases a second engine, franc, can be loaded once from the jsDelivr CDN; it compares three-letter sequences against profiles of 187 languages. Both engines show a confidence score, the runner-up languages and the share of each script. The sentence view runs the detector on each sentence separately, colours the result and shades sentences that are in a different language from the main one, so mixed emails, bilingual documents and code-switching in chat messages stand out.
How sure is the answer?
Confidence grows with the length of the text and the gap between the best and the second-best language. Two or three words are often not enough: the and a appear in English, but so do many loanwords elsewhere. A full sentence usually gives a clear answer. Closely related languages are the hardest pairs: Danish and Norwegian Bokmål, Indonesian and Malay, Czech and Slovak, Croatian, Serbian and Bosnian in Latin letters, and Hindi and Marathi. The runner-up list shows when two languages are close.
Mixed text
Set the minimum number of words for a sentence to be checked. Very short sentences, such as OK or Thanks, are marked too short instead of guessed. The colour key lists every language found and its share of the text, and the CSV export gives each sentence with its language and confidence for a spreadsheet.
The franc engine
franc is an open-source detector by Titus Wormer under the MIT licence. It is about 360 KB, is loaded only when you choose it, and runs in your browser like the built-in engine. If it cannot be loaded, the built-in engine keeps working.
Limits
Detection is statistical, not a reading of the meaning, so a short or very technical text can be misidentified, and names, code and numbers carry no language. It is not a translator. Dialects and regional variants (for example European and Brazilian Portuguese) are not told apart. Romanised text such as Hindi typed in Latin letters is not detected as Hindi. Nothing is uploaded.
Worked example
A customer email reads: three English sentences of 38 words, one French sentence of 14 words and one Spanish sentence of 12 words. The main result is English with 71 % confidence, script Latin 100 %. The sentence view underlines the English sentences in blue and shades the French and Spanish ones, and the share list shows English 64 %, French 19 % and Spanish 17 % by characters. Switching to the franc engine gives the same answer with the three-letter code eng.
Quick facts
- Category: Text & Writing
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: Unicode Standard Annex 24, Script Property; franc 6.2.0 trigram detector (MIT licence)
Frequently asked questions
How many languages can it detect?
The built-in engine identifies about 80 languages from 28 scripts. The optional franc engine covers 187 languages with more than about one million speakers each.
Why does it confuse Danish and Norwegian?
The two written languages share most common words and spellings. The detector looks at small differences such as af and av, sig and seg or hvad and hva; in a short text there may be none, so both appear with similar scores.
Can it detect the language of each sentence separately?
Yes. The sentence view checks every sentence on its own, colours it by language and shades those that differ from the main language. Export them as CSV if you need a list.
Does it work for Chinese and Japanese?
Yes. Text with hiragana or katakana is Japanese. Text with only Chinese characters is Chinese, labelled simplified or traditional from characters such as 们 and 們 that differ between the two forms.
Does it work offline?
The built-in engine does, once the page has loaded. The franc engine needs one download the first time you switch to it.
Is my text sent to a server?
No. Both engines run in your browser. Loading franc downloads the program from jsDelivr, but your text never leaves the page.
