Skip to content

Hindi Number to Words in JavaScript (hi-IN)

Convert numbers to Hindi words in JavaScript and TypeScript using to-words — the only npm library with native Devanagari script, Indian scale (लाख, करोड़, अरब), and currency support.

Locale codes: hi-IN · Numbering system: Indian · Currency: Rupee / Paise · Script: Devanagari

Install

bash
npm install to-words

Basic Conversion

js
import { ToWords } from 'to-words';

const tw = new ToWords({ localeCode: 'hi-IN' });

tw.convert(12345); // "बारह हजार तीन सौ पैंतालीस"
tw.convert(100000); // "एक लाख"
tw.convert(10000000); // "एक करोड़"

Currency (Rupees & Paise)

js
tw.convert(1234.56, { currency: true });
// "बारह सौ चौंतीस रुपये और छप्पन पैसे"

Ordinal Numbers

js
tw.toOrdinal(3); // "तीसरा"
tw.toOrdinal(21);

Indian Scale

ValueEnglishHindi
100One Hundredएक सौ
1,000One Thousandएक हजार
100,000One Lakhएक लाख
10,000,000One Croreएक करोड़
1,000,000,000One Arabएक अरब
100,000,000,000One Kharabएक खरब
10,000,000,000,000One Neelएक नील
1,000,000,000,000,000One Padmaएक पद्म
100,000,000,000,000,000One Shankhएक शंख

Tree-shakeable (single-locale) import

js
import { toWords, toCurrency, toOrdinal } from 'to-words/hi-IN';

toWords(50000); // "पचास हजार"
toCurrency(999.99); // "नौ सौ निन्यानवे रुपये और निन्यानवे पैसे"

Locale Codes

Locale codeCountryCurrencyNotes
hi-INIndiaRupee / PaiseHindi output in Devanagari with Indian-scale grouping

FAQ

Q: What locale code should I use for Hindi?
A: hi-IN.

Q: Does it use the Indian numbering system (lakh/crore)?
A: Yes — 100,000 = "एक लाख", not "One Hundred Thousand".

Q: Is Devanagari script output supported?
A: Yes, by default. You get native Devanagari for all conversions.

Q: Can I get numbers in English but with Indian scale?
A: Use en-IN instead of hi-IN.

Released under the MIT License.