Language Name to Code Converter
Enter a language name or ISO 639-1 code and pick a direction to convert.
Result
How it is calculated
This is a dictionary lookup over all 183 ISO 639-1 languages, not a calculation. In the name-to-code direction your text is trimmed, lower-cased and has runs of spaces collapsed, then matched against a list of English names. Several alternative names point to the same code: Farsi and Persian give fa, Filipino and Tagalog give tl, and Chinese, Mandarin and Mandarin Chinese all give zh. In the code-to-name direction the two-letter code is matched without regard to case and returns the main English name. The extra "matched" line shows which language was recognised. On a page in another language, the name in that language is accepted as well. Three-letter codes (ISO 639-2) and regional tags like pt-BR are not recognised, and a name or code outside the list gives no result.
Worked example
Type Farsi with the name-to-code direction. The tool lower-cases it to "farsi", finds it in the list of alternative names and returns the code fa. The matched line shows Persian, which is the main name stored for fa. Reversing the direction and entering fa gives Persian. Looking up Mandarin Chinese gives zh, and code2name for zh returns "Mandarin Chinese" on the English page.
Common mistakes
- Leaving the direction on name-to-code while typing a code such as
en. The tool looks for a language called "en" and finds nothing; switch the direction to code-to-name. - Typing the language's own name, like Deutsch or Español. Use the English name, German or Spanish, or the name in the language of the page.
- Entering a three-letter code such as
zhoortur. Only the two-letter ISO 639-1 codes are known, so these give no result. - Expecting regional variants.
pt-BRandzh-TWare locale tags, not language codes, whilenb(Norwegian Bokmål) andnn(Nynorsk) are codes of their own; plain Norwegian maps tono. - Looking up a language with no two-letter code, for example Hawaiian or Serbo-Croatian. ISO 639-1 has 183 languages, so a real language outside them returns no result.
About this calculator
ISO 639-1 is the standard that assigns a two-letter code to each of the world's major languages — “en” for English, “tr” for Turkish, “ja” for Japanese, and so on — providing a compact, unambiguous identifier that doesn't depend on how a language's name is spelled in any particular language.
These codes appear everywhere in software: HTML lang attributes, browser Accept-Language headers, translation file names, and URL locale segments (like /tr/ or /de/) all rely on them. Web developers, localization engineers, and content managers use a name-to-code converter to quickly look up the right code when configuring i18n settings, naming translation files, or troubleshooting a locale that isn't rendering correctly.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
What comes back is the bare two-letter code, which is not always enough for a website. Mandarin Chinese gives zh, but hreflang and lang attributes often need a script or region as well, such as zh-Hans or zh-Hant, and you add that part yourself. Which languages missing from the list do you need for your project?