On this page
- Can you use Claude Code in Urdu?
- How we did this
- What were the results?
- Did Claude Code reply in Urdu?
- Where did the prompt language make a difference?
- Roman Urdu or Urdu script: which should you use?
- How do you set Claude Code’s reply language?
- Tips for prompting Claude Code in Urdu
- What this test cannot tell you
- Summary
- References
Yes, Claude Code works when you prompt it in Urdu or Roman Urdu. In our test of 14 runs on four small coding tasks, every task was finished and passed our own checks whether the prompt was in English, Roman Urdu or Urdu script, and Claude Code replied in the language of the prompt every time. The code itself stayed in English in 12 of the 14 runs.
We build WordPress sites and custom software in Pakistan with Claude Code, and like many developers here we often think and type in Roman Urdu. So we tested it on our own computer on 25 October 2026 and saved every prompt, transcript and file. Below is what happened, small differences included, and what one small test cannot tell you.
Can you use Claude Code in Urdu?
Yes. Claude Code is Anthropic’s coding agent that reads and edits the files in your project from the terminal (our guide to what Claude Code is and how it works covers the basics), and you can write your prompt in any language the model reads. Anthropic’s multilingual support page benchmarks 14 languages besides English, including Hindi (96.7% of English performance for Claude Sonnet 4.5) and Arabic (97.2%). Urdu is not in the table. The page says Claude “is capable in many languages beyond those benchmarked” and tells you to test the languages you use.
The same page makes two more points that matter here. Claude infers the reply language from the conversation, and for best results you should submit text “in its native script rather than transliteration”. Roman Urdu is transliteration, so we wanted to see whether that advice changes anything for everyday coding prompts.
How we did this
We picked four small tasks with answers we could check, wrote each prompt in English, Roman Urdu and Urdu script with the same content, and ran each once. We added two Roman Urdu prompts written the way people type in chat (“fix kr do pls”), for 14 runs in total.
| Task | What Claude had to do | How we checked it |
|---|---|---|
| CGPA function | Python function cgpa_to_percentage on a 4.0 scale (CGPA divided by 4, times 100), a ValueError outside 0 to 4, and pytest tests | 7 conversions and 3 bad inputs of our own, plus Claude’s tests |
| Cart bug fix | Fix cart.js so it prints 2300. It had two bugs: a loop off by one, and a delivery fee string added as text | node cart.js, plus 4 cases of our own |
| WordPress shortcode | Plugin file with a [current_year] shortcode that returns the year, with a plugin header | php -l, then a WordPress stub that registers and calls the shortcode |
| Phone number function | Python function that turns 03001234567, 0300-1234567, +92 300 1234567 or 923001234567 into 923001234567, None if invalid, and pytest tests | 6 valid and 7 invalid numbers of our own, plus Claude’s tests |
- Setup: Claude Code 2.1.220 with the model alias sonnet (it reported claude-sonnet-5) at medium effort, in non-interactive mode with
claude -p. - Limits: file tools only (Read, Write, Edit, Glob, Grep),
--permission-mode acceptEdits,--max-turns 10,--max-budget-usd 1and--safe-mode. The CLI reference says safe mode stops CLAUDE.md, skills, plugins, hooks, MCP servers and auto memory from loading, so our own settings could not push the reply language either way. - Isolation: each run started in a fresh folder with no saved session, so no run could see another.
- Checks: Claude had no shell, so it could not run anything. We ran the code ourselves with Python 3.12, pytest 9.1, Node.js 24 and PHP 8.4, using test cases Claude never saw.
- Date: 25 October 2026, between 00:02 and 00:08 Pakistan time.
The CGPA task used the simple formula on purpose, because it is easy to check. Real conversions can use other formulas, such as HEC bands, and our CGPA to percentage calculator shows both results.
What were the results?
| Task | English | Roman Urdu | Urdu script | Chat-style Roman Urdu |
|---|---|---|---|---|
| CGPA function | Correct | Correct | Correct | Not run |
| Cart bug fix | Correct | Correct | Correct | Correct |
| WordPress shortcode | Correct | Correct, see below | Correct | Not run |
| Phone number function | Correct | Correct | Correct | Correct |
| Reply language | English, 4 of 4 | Roman Urdu, 4 of 4 | Urdu script, 4 of 4 | Roman Urdu, 2 of 2 |
All 14 runs created or fixed the files we asked for, and all 14 passed our hidden checks. Claude’s own tests passed too: 6 tests in each CGPA run and 14 to 18 in each phone number run. In the bug fix, all four runs found both bugs, not only the crash: the loop now runs from i = 0 while i < items.length, and the fee goes through Number(). For the CGPA and cart tasks, the English, Roman Urdu and Urdu script runs produced exactly the same code, character for character.
Runs took 5 to 35 seconds each. Claude Code’s own cost estimate for all 14 runs together was about US$0.56, and the CLI reference notes that this is a client-side estimate that can differ from your bill.

The one cost of Urdu script we could measure is tokens. Urdu script prompts made the first request 28 to 106 tokens larger than the English prompt for the same task, while Roman Urdu stayed within 35 tokens of English either way. Against a first request of about 8,700 tokens, most of it Claude Code’s own instructions and tool definitions, that is small.
Did Claude Code reply in Urdu?
Yes, every time, without being asked. It mirrored the prompt: English got English, Roman Urdu got Roman Urdu and Urdu script got Urdu script, with file names, function names and technical words left in English inside the reply. Short excerpts from the saved replies:
| Prompt | From Claude’s reply |
|---|---|
| Roman Urdu, cart bug | “Do bugs the” … “Ab node cart.js 2300 print karega.” |
| Chat-style Roman Urdu, phone | “phone.py aur test_phone.py ban gaye hain.” |
| Urdu script, cart bug | “دو بگز تھے” |
| Urdu script, CGPA | “cgpa.py اور test_cgpa.py دونوں بن گئے ہیں” |
| English, phone | “I don’t have a shell tool in this session to execute pytest, so please run pytest locally to confirm” |
Where did the prompt language make a difference?
Not in whether the task got done, but in the details:
- Urdu crept into two code files. The Urdu script shortcode run wrote the plugin’s Description header in Urdu, and the Urdu script phone run wrote its docstring in Roman Urdu (“Pakistani mobile number ko ’92XXXXXXXXXX’ format mein convert karta hai.”). Both work, but a plugin header shows in the WordPress plugins screen. The other 12 runs kept all code and comments in English.
- The Roman Urdu shortcode used a weaker date function. It returned
date( 'Y' ), while the English and Urdu script runs useddate_i18n( 'Y' ), which WordPress documents as using the site’s time zone. WordPress runs PHP in UTC, as a core developer explains under the WordPress 5.3 date and time notes, so on a site set to Pakistan time (UTC+5)date()would show last year for the first five hours of 1 January. With one run per prompt, we cannot say Roman Urdu caused this rather than chance. - Same request, different edge cases. The Roman Urdu phone run also accepted a 10 digit number without the leading zero (3001234567), while the English and Urdu script runs returned None for it. Our prompt did not cover that case, so neither answer is wrong.
- The English phone run worked hardest. It wrote the file, edited it, then re-read it to review its own work: 6 turns and 35 seconds, against 3 or 4 turns and 15 to 19 seconds for the other phone runs.
- One reply promised too much. The chat-style phone run ended with “Chaho to pytest chala ke confirm kar sakta hoon” (I can run pytest to confirm if you like), but that session had no shell tool.
- Check plugin headers. All three shortcode runs filled the Author line with a company name that was not in our prompt.
Our write-up on building a WordPress theme with Claude Code shows the same pattern in bigger jobs.
Roman Urdu or Urdu script: which should you use?
Use the one you think in. In our runs both did as well as English on small, clearly specified tasks. What mattered more than the language was how exact the prompt was: every prompt that named the file, the function and the expected output got exactly that.
| Question | Roman Urdu | Urdu script |
|---|---|---|
| Tasks correct in our test | 6 of 6, including chat style | 4 of 4 |
| Reply came back in | Roman Urdu | Urdu script |
| Extra tokens vs English | 35 or fewer, either way | 28 to 106 more |
| Urdu text inside code files | 0 of 6 runs | 2 of 4 runs |
| Anthropic’s general advice | Transliteration, not preferred | Native script, preferred |
How do you set Claude Code’s reply language?
By default Claude Code answers in the prompt’s language, which is what we saw. If you want something fixed, such as explanations in Roman Urdu but code in English, write it down once. Anthropic’s multilingual page says that stating the input and output languages improves reliability, and in Claude Code the place for standing instructions is the CLAUDE.md file, which our CLAUDE.md guide explains. For example:
## Language
- Explain in Roman Urdu, even when I write in English.
- Write all code, comments, docstrings, commit messages and plugin headers in English.
- Keep file names, function names and error messages in English.
Our free CLAUDE.md generator builds a starter file you can add these lines to. Safe mode, which we used for the test, skips CLAUDE.md, so the rule only applies in normal sessions.
Tips for prompting Claude Code in Urdu
- Write names exactly as they appear in code: file names, functions, shortcodes and commands in English letters, such as
cgpa.pyor[current_year]. - Say what correct looks like: an expected output (“2300 print hona chahiye”) or sample inputs and outputs. All our prompts did this.
- Say which language you want for code comments and headers if it matters to you.
- Do not worry about spelling. Our chat-style prompts with “kr do”, “nai aa rha” and “b likh dena” worked in 2 of 2 runs.
- Limit what Claude can do while you try things out. File tools in acceptEdits mode are a safe start, and our guide to Claude Code permission modes explains the options.
- Run the tests yourself, or let Claude run them. Its own tests passed every time but missed the shortcode’s time zone detail, which we found by reading the code.
- Read every generated header and comment before you ship, especially WordPress plugin headers.
What this test cannot tell you
- One run per prompt. Another run can give different code, so one difference, such as the date function, may be chance.
- Four small, clear tasks. Large refactors, vague requests and long sessions may behave differently.
- One model and one version. We tested Sonnet at medium effort in Claude Code 2.1.220. Opus, Haiku or a later version may differ.
- Our own wording. Other people spell Roman Urdu and phrase Urdu differently.
- No shell. Claude could not run code; with a shell it could have run its own tests.
Summary
Claude Code handled English, Roman Urdu and Urdu script prompts equally well in our test: 14 of 14 runs were finished and correct, and every reply came back in the prompt’s language. The code stayed in English except in two Urdu script runs, and Urdu script added 28 to 106 tokens to the first request. Prompt in the language you think in, keep code names in English, check headers and comments, and fix your reply and code language once in CLAUDE.md with our CLAUDE.md generator.
References
- Multilingual support, Claude Docs
- CLI reference, Claude Code Docs
- date_i18n(), WordPress Developer Resources
- Date/Time component improvements in WordPress 5.3, Make WordPress Core