Rules
Every rule with its citation and a worked example, including the cases implementations fail on.
The se- rule
se- is the bound form of satu, "one". For a leading 1 the word fuses instead of compounding: se- + puluh gives sepuluh (ten), se- + ratus gives seratus (one hundred), se- + ribu gives seribu (one thousand). The fusion stops at ribu — standard usage takes satu juta, not sejuta.
Source: KBBI; PUEBI/EYD, penulisan bilangan.
- 10se- + puluh →sepuluhcommon error: satu puluh
- 11se- + belas →sebelascommon error: satu belas
- 100se- + ratus →seratuscommon error: satu ratus
- 1.000se- + ribu →seribucommon error: satu ribu
- 1.000.000satu + juta — peleburan berhenti di ribu →satu jutacommon error: sejuta (varian, lihat opsi)
The teens
11 to 19 use belas and are not derivable from the tens pattern. Sebelas fuses; the rest compound.
Source: KBBI, lema belas.
- 11se- + belas →sebelas
- 12dua + belas →dua belas
- 19sembilan + belas →sembilan belas
Empty group suppression
A three-digit group of 000 emits nothing at all. This is the most common structural bug in other implementations.
Source: Konvensi pembacaan bilangan; PUEBI/EYD.
- 1.000.0011 juta + 000 ribu + 001 →satu juta satucommon error: satu juta nol ribu satu
- 1.000.000.0011 miliar + 000 juta + 000 ribu + 001 →satu miliar satucommon error: satu miliar nol juta nol ribu satu
- 101.000101 ribu + 000 →seratus satu ribu
Scale words
The scale words sit exactly 10³ apart — ribu 10³ (thousand), juta 10⁶ (million), miliar 10⁹ (billion), triliun 10¹² (trillion), kuadriliun 10¹⁵ (quadrillion) — and that spacing is precisely why the number is cut every three digits. Grouping by threes is not a writing habit; it is the shape of this word list. The spellings milyar and trilyun are common in the field but are not KBBI forms; both are available as an option. Above kuadriliun usage is unsettled, so the library refuses rather than inventing a scale word.
Source: KBBI, lema ribu, juta, miliar, triliun, kuadriliun.
- 1.000.000.000satu miliar
- 1.000.000.000.000satu triliun
- 1.000.000.000.000.000satu kuadriliun
- 1.000.000.000.000.000.000Nilai melampaui 999.999.999.999.999.999. Pemakaian kata skala di atas itu belum mapan dalam bahasa Indonesia, jadi pustaka ini menolak alih-alih mengarang.di-luar-jangkauan
The words in play
Every output uses these words and no others. Units and teens have their own forms; the rest compound.
| Word | Magnitude | Meaning |
|---|---|---|
| satu | 1 | one |
| dua | 2 | two |
| tiga | 3 | three |
| empat | 4 | four |
| lima | 5 | five |
| enam | 6 | six |
| tujuh | 7 | seven |
| delapan | 8 | eight |
| sembilan | 9 | nine |
| sepuluh | 10 | ten |
| sebelas | 11 | eleven |
| dua belas | 12 | twelve |
| sembilan belas | 19 | nineteen |
| ribu | 1.000 | thousand |
| juta | 1.000.000 | million |
| miliar | 1.000.000.000 | billion |
| triliun | 1.000.000.000.000 | trillion |
| kuadriliun | 1.000.000.000.000.000 | quadrillion |
Decimals
The comma is the decimal separator and is read as koma; the digits after it are read individually, not as a tens number.
Source: PUEBI/EYD, tanda koma pada angka desimal.
- 1,251 + koma + 2 + 5 →satu koma dua limacommon error: satu koma dua puluh lima
- 0,050 + koma + 0 + 5 →nol koma nol lima
Precision above 2⁵³
JavaScript numbers lose precision above 2⁵³ ≈ 9×10¹⁵, just past triliun. A number-based implementation is correct through triliun and silently wrong after — it passes casual testing and corrupts a real invoice. This library uses BigInt throughout and rejects number input.
Source: ECMA-262, Number.MAX_SAFE_INTEGER.
- 9.007.199.254.740.993sembilan kuadriliun tujuh triliun seratus sembilan puluh sembilan miliar dua ratus lima puluh empat juta tujuh ratus empat puluh ribu sembilan ratus sembilan puluh tiga
- 999999999999999999sembilan ratus sembilan puluh sembilan kuadriliun sembilan ratus sembilan puluh sembilan triliun sembilan ratus sembilan puluh sembilan miliar sembilan ratus sembilan puluh sembilan juta sembilan ratus sembilan puluh sembilan ribu sembilan ratus sembilan puluh sembilan
The exact value, through BigInt
9.007.199.254.740.993
sembilan kuadriliun tujuh triliun seratus sembilan puluh sembilan miliar dua ratus lima puluh empat juta tujuh ratus empat puluh ribu sembilan ratus sembilan puluh tiga
The same value, after passing through number
9.007.199.254.740.992
sembilan kuadriliun tujuh triliun seratus sembilan puluh sembilan miliar dua ratus lima puluh empat juta tujuh ratus empat puluh ribu sembilan ratus sembilan puluh dua
Actually run at build time: the value above is passed through Number() and back, exactly as it would be in a number-based implementation. The last digit changes, and the last word changes with it — no error, no warning.
Currency and documents
On receipts and cheques the amount in words ends with rupiah and is bracketed with hash marks at both ends so nothing can be added after signing. Sen is used for hundredths where the accounting context requires it.
Source: Konvensi dokumen keuangan Indonesia; KBBI, lema sen.
- 1.500seribu lima ratus
- 1500,25seribu lima ratus koma dua lima
Cited variants
Every option names the usage behind both of its sides, and every side is run against the same input at build time. The words that change are marked, so you can see which options move a single word and which rebuild the whole sentence. There is no silent default.
sejutasatu juta atau sejuta
default: false — satu jutaThe same input1.000.000
falsesatujuta
Peleburan se- berlaku pada puluh, belas, ratus, dan ribu. Juta tidak ikut dalam pola itu pada pemakaian baku, sehingga bentuk hitungnya satu juta. — KBBI, lema juta; PUEBI/EYD, penulisan bilangan.
true1 changedsejuta
sejuta terdaftar di KBBI dan lazim dalam ragam sastra dan percakapan ("sejuta rasa"), meski jarang dipakai untuk jumlah pada dokumen. — KBBI, lema sejuta.
ejaanMiliarmiliar/triliun atau milyar/trilyun
default: baku — miliar, triliunThe same input1.001.000.000.000
bakusatutriliunsatumiliar
Bentuk yang dibakukan KBBI adalah miliar dan triliun. — KBBI, lema miliar dan triliun.
varian2 changedsatutrilyunsatumilyar
milyar dan trilyun sangat lazim pada dokumen keuangan dan sistem lama. Disediakan agar keluaran bisa disamakan dengan sistem yang sudah berjalan. — Pemakaian umum; bukan bentuk KBBI.
mataUangimbuhan mata uang
default: tidakThe same input1.500
tidakseribulimaratus
Bilangan murni, tanpa konteks mata uang. — —
rupiah1 changedseribulimaratusrupiah
Pada kuitansi, faktur, dan cek, jumlah terbilang ditutup dengan satuan mata uang. — Konvensi dokumen keuangan Indonesia.
senangka di belakang koma
default: komaThe same input1,25
komasatukomadualimarupiah
Koma adalah pemisah desimal, dibaca koma, dan digit di belakangnya dibaca satu per satu — bukan sebagai bilangan puluhan. — PUEBI/EYD, tanda koma pada angka desimal.
sen3 changedsaturupiahduapuluhlimasen
Dalam konteks akuntansi, perseratusan rupiah dibaca sebagai sen. Hanya berlaku sampai dua digit; lebih dari itu ditolak, tidak dibulatkan. — KBBI, lema sen; konvensi pembukuan.
kapitalisasikapitalisasi
default: tidakThe same input1.500
tidakseribulimaratusrupiah
Keluaran apa adanya untuk disisipkan ke dalam kalimat. — —
kalimat1 changedSeribulimaratusrupiah
Huruf kapital pada awal, seperti jumlah terbilang pada kuitansi. — Konvensi dokumen keuangan Indonesia.
judul4 changedSeribuLimaRatusRupiah
Kapital pada setiap kata, dipakai pada akta dan sebagian format cek. — Konvensi dokumen notaris.