Indonesian Number to Words in JavaScript โ
Use this page when you need Bahasa Indonesia or Javanese number words in product flows like invoices, banking summaries, receipts, or spoken-number interfaces.
Locale codes:
id-ID,jv-IDยท Numbering system: Short scale ยท Currency: Rupiah / Sen ยท Script: Latin
Install โ
bash
npm install to-wordsBasic Conversion โ
js
import { ToWords } from 'to-words';
const id = new ToWords({ localeCode: 'id-ID' });
const jv = new ToWords({ localeCode: 'jv-ID' });
id.convert(137); // "Seratus Tiga Puluh Tujuh"
id.convert(1000000);
jv.convert(2500);
jv.convert(1000000);id-ID is the safest default when your UI copy is in Indonesian. jv-ID is useful for region-specific experiences where Javanese phrasing matters.
Currency - Rupiah / Sen โ
js
id.convert(98000, { currency: true });
id.convert('1250.50', { currency: true });
jv.convert(78000, { currency: true });Ordinal Numbers โ
js
id.toOrdinal(3);
id.toOrdinal(21);Regional Notes โ
id-IDuses Indonesian number words likeJuta,Miliar, andTriliunjv-IDprovides Javanese wording while keeping the same API shape, so you can switch locales without rewriting application logicid-IDalso supports fraction-style decimals for legal and financial wording
Locale Codes โ
| Locale code | Language | Currency | Notes |
|---|---|---|---|
id-ID | Indonesian | Rupiah / Sen | Best default for Indonesian products and admin tools |
jv-ID | Javanese | Rupiah / Sen | Useful for region-specific apps and localised voice output |
Related โ
FAQ โ
Q: Does to-words support terbilang-style Indonesian output? Yes. Use id-ID for Indonesian wording with the standard convert(), toOrdinal(), and currency APIs.
Q: Can I switch between Indonesian and Javanese without changing my app code? Yes. Keep the same API and swap only the locale code between id-ID and jv-ID.