Urdu is spoken by more than 230 million people, yet building an app in Urdu still means solving the same small problems from scratch. Most Pakistanis type Urdu in English letters (“aap kaise hain”), so how do you show it in Urdu script? How do you write “25 lakh rupees” in Urdu words on a receipt? How do you show today’s date in Urdu, or the Hijri date? Why does a search for کیا fail when the user typed it on an Arabic keyboard?
urdu-toolkit answers all of these in one free, open-source package. It also comes with a library of ready-made prompts for using AI assistants like Claude and ChatGPT in Urdu.
What’s inside
| Feature | Example |
|---|---|
| Roman Urdu → Urdu | “aap kaise hain?” → آپ کیسے ہیں؟ |
| Numbers in Urdu words | 49 → انچاس |
| Amounts in Urdu words | 2,500,000 → پچیس لاکھ روپے |
| Urdu digits | 2026 ↔ ۲۰۲۶ |
| Urdu date | منگل، ۲۴ نومبر ۲۰۲۶ |
| Hijri date | ۱۴ جمادی الثانی ۱۴۴۸ ہجری |
| Text cleanup | Arabic ك/ي → Urdu ک/ی, removes aerab |
| AI prompts | 16 tested prompts for Claude, ChatGPT and Gemini |
It has zero dependencies, includes TypeScript types, and works in Node.js, browsers, React and Next.js. It is free under the MIT license for personal and commercial use.
Try it online
Type in Roman Urdu and get proper Urdu script, write amounts in Urdu words, and see today’s date in Urdu and Hijri.
Roman Urdu to Urdu converter
Common words are always converted correctly. Rare words are a best guess, because Roman Urdu doesn’t show which Urdu letter is meant (س / ص / ث).
Amount in Urdu words
Any number or amount in Urdu words, ready for a cheque, receipt or invoice.
Date in Urdu & Hijri
Any date in Urdu, with the Islamic (Hijri) date. Hijri dates follow the Umm al-Qura calendar and may differ by a day from Pakistan’s moon sighting.
How to install
npm install urdu-toolkit
Or load it in any web page from a CDN:
<script type="module">
import { romanToUrdu } from 'https://cdn.jsdelivr.net/npm/urdu-toolkit/+esm';
console.log(romanToUrdu('khush aamdeed'));
</script>
Roman Urdu to Urdu
import { romanToUrdu } from 'urdu-toolkit';
romanToUrdu('Assalam o alaikum bhai, order kab tak milega?');
// 'السلام و علیکم بھائی، آرڈر کب تک ملے گا؟'
// Add your own words: brand names, products, people
romanToUrdu('zexcart zabardast hai', {
dictionary: { zexcart: 'زیکس کارٹ', zabardast: 'زبردست' },
});
Every word is first looked up in a dictionary of more than 600 common Roman Urdu spellings. People write the same word in many ways (“kaise”, “kese”, “kesy”), and all of them map to کیسے. Words that aren’t in the dictionary are converted with phonetic rules. The future tense is written as two words in Urdu, so “milega” becomes ملے گا. Question marks, commas and full stops are changed to their Urdu forms.
An honest limit: Roman Urdu doesn’t tell you which Urdu letter is meant. An “s” could be س, ص or ث, and a “z” could be ز, ذ, ض or ظ. Common words are always right, but a rare word may come out with the wrong letter. You can fix the words you use often with the dictionary option, and anyone can add words to the project on GitHub.
Numbers and amounts in Urdu words
import { numberToUrduWords, amountToUrduWords, formatUrduNumber } from 'urdu-toolkit';
numberToUrduWords(123456789);
// 'بارہ کروڑ چونتیس لاکھ چھپن ہزار سات سو نواسی'
amountToUrduWords(150250.5);
// 'ایک لاکھ پچاس ہزار دو سو پچاس روپے اور پچاس پیسے'
amountToUrduWords(2500000, { only: true }); // 'پچیس لاکھ روپے صرف'
formatUrduNumber(1500000); // '۱۵,۰۰,۰۰۰'
Unlike English, Urdu numbers from 1 to 99 don’t follow a pattern: 49 is انچاس, 59 is انسٹھ, 79 is اناسی. That’s why simple code can’t build them, and why the library lists all 100 numbers. Large numbers use the South Asian system: ہزار، لاکھ، کروڑ، ارب، کھرب.
Urdu and Hijri dates
import { formatUrduDate, formatHijriDate } from 'urdu-toolkit';
formatUrduDate(new Date(2026, 10, 24)); // 'منگل، ۲۴ نومبر ۲۰۲۶'
formatHijriDate(new Date(2026, 1, 18)); // '۱ رمضان ۱۴۴۷ ہجری'
The Hijri date follows the Umm al-Qura calendar. Pakistan starts Islamic months on local moon sighting (Ruet-e-Hilal), so the official date in Pakistan can be one day different.
Cleaning Urdu text
import { normalizeUrdu, removeDiacritics, isUrdu, toUrduDigits } from 'urdu-toolkit';
normalizeUrdu('كيا حال ہے'); // Arabic letters → Urdu letters
removeDiacritics('مُحَمَّد'); // 'محمد'
isUrdu('آپ کیسے ہیں'); // true
toUrduDigits('Order #2026'); // 'Order #۲۰۲۶'
Arabic and Urdu have letters that look exactly the same on screen but are different characters inside the computer, for example the Arabic ي and the Urdu ی. If one user types with an Arabic keyboard and another with an Urdu keyboard, a database search won’t match them. Running text through normalizeUrdu before saving and searching fixes this.
Urdu AI prompts library
AI assistants understand Urdu and Roman Urdu well, but they often reply in English or in stiff, bookish Urdu unless you ask clearly. The project includes 16 ready-made prompts you can copy and paste, including:
- Replying to customers on WhatsApp in natural Roman Urdu
- Answering a complaint politely in Urdu
- Product descriptions and social media posts in Urdu, Roman Urdu and English
- Explaining a contract, bank letter or government notice in simple Urdu
- Formal applications (darkhwast), speeches and announcements
- Study help, quizzes and English practice with Urdu explanations
- A monthly household budget
There are also six simple rules for writing your own Urdu prompts: name the script you want, describe the reader, and set the length and tone.
Who is it for?
- Chat and support apps: let users type Roman Urdu and show it in Urdu script.
- Billing and POS software: print amounts in Urdu words on receipts.
- News, school and religious apps: Urdu and Hijri dates.
- Search and databases: normalize Urdu so every spelling matches.
- Anyone using AI in Urdu: the prompts library.
What’s next
- A bigger Roman Urdu dictionary, with help from the community
- Urdu to Roman Urdu
- Ordinal numbers (پہلا، دوسرا، تیسرا)
- Time in Urdu (ساڑھے تین بجے)
- A Python version
The easiest way to help is to add Roman Urdu words. You don’t need to be a programmer: see how to contribute, or send us the words and we’ll add them.
Frequently asked questions
Is urdu-toolkit free?
Yes. It is open source under the MIT license, free for personal and commercial use.
Does the Roman Urdu converter use AI or the internet?
No. It runs completely on your device using a dictionary and rules, so it is instant, works offline and your text is never sent anywhere.
Why is a word sometimes spelled wrong?
Roman Urdu doesn’t show which of several similar Urdu letters a word uses. Common words are in the dictionary and always come out right. For other words, use the dictionary option or ask us to add them.
Is the Hijri date the same as Pakistan’s official date?
Usually, but not always. The library uses the Umm al-Qura calendar, while Pakistan follows local moon sighting, which can make a one-day difference.
Try it now
Use the free Urdu tools above, or add urdu-toolkit to your next project. See all Dev Tools. A star on GitHub helps other Urdu developers find it.