Rupiah tools
v1.0.0Terbilang (Indonesian number words), Rupiah format/parse and PPN calculator.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
terbilang Terbilang (angka ke kata)
Mengubah angka menjadi kata-kata Bahasa Indonesia (terbilang) untuk kuitansi/invoice. Converts a number to Indonesian words: up to 999 kuadriliun, decimals with "koma", negatives, optional "rupiah" suffix and "sen", correct seratus/seribu/sebelas rules. Example: 1500 -> "seribu lima ratus".
| Parameter | Type | Description |
|---|---|---|
angka * | number | string | A JSON number, or text such as "1250000", "Rp1.250.000,50" or "1,5 jt". Send very large numbers (>= 2^53) as text. |
huruf | string | Letter case: kecil (lower), awal (first letter), judul (Title Case), besar (UPPER). |
kata_negatif | string | Word used for negative numbers. |
rupiah | boolean | Append "rupiah". |
sen | boolean | With rupiah=true: read up to 2 decimals as sen ("... rupiah lima puluh sen") instead of "koma". |
format_rupiah Format Rupiah
Memformat angka sebagai Rupiah gaya Indonesia. Formats a number as Rupiah: "Rp1.234.567,89" (dot thousands, comma decimals), with or without "Rp", fixed decimals, ",-" suffix, or compact like "Rp1,2 jt" / "Rp1,2 juta".
| Parameter | Type | Description |
|---|---|---|
angka * | number | string | A JSON number, or text such as "1250000", "Rp1.250.000,50" or "1,5 jt". Send very large numbers (>= 2^53) as text. |
akhiran_strip | boolean | Add ",-" (e.g. "Rp1.000,-"); only with 0 decimals. |
desimal | integer | string | Decimals 0-4, or "auto" (default: 0 for whole numbers, else 2). Rounds half up. |
ringkas | boolean | Compact: rb / jt / M / T (e.g. "Rp1,2 jt"). |
ringkas_desimal | integer | Max decimals in compact mode (trailing zeros dropped). |
ringkas_panjang | boolean | Compact with full words: ribu / juta / miliar / triliun. |
simbol | boolean | Prefix "Rp". |
spasi | boolean | Space after Rp ("Rp 1.000"). Indonesian spelling rules (EYD) write it without a space. |
parse_rupiah Baca nominal Rupiah dari teks / Parse Rupiah
Membaca nominal dari teks berantakan. Extracts a number from messy text: "Rp 1.250.000,-", "IDR 50k", "1,5 jt", "2.5M", "(Rp1.000)", "Total: Rp1.234.567,89" or words like "dua juta lima ratus ribu rupiah". Indonesian conventions first ("." thousands, "," decimal); ambiguities are reported.
| Parameter | Type | Description |
|---|---|---|
teks * | string | Text that contains an amount. |
hitung_ppn Hitung PPN / Indonesian VAT
Menghitung PPN Indonesia (aturan 2025+). Computes Indonesian VAT (PPN) from the price before tax, from DPP nilai lain, or backwards from a total that includes PPN. Default kategori nonmewah = 12% x DPP nilai lain 11/12 (effective 11%, PMK 131/2024 Pasal 3); mewah = 12% x price (Pasal 2); custom = your own rate/factor. Returns harga jual, DPP, PPN, total, the rule used and its source. Calculation aid, not tax advice.
| Parameter | Type | Description |
|---|---|---|
nilai * | number | string | A JSON number, or text such as "1250000", "Rp1.250.000,50" or "1,5 jt". Send very large numbers (>= 2^53) as text. |
dari | string | What "nilai" is: harga_jual (price/penggantian before PPN, default), dpp_nilai_lain (already the DPP), total (price including PPN). |
faktor_dpp | number | string | Only for kategori=custom: DPP factor, e.g. "11/12", 0.9 or "90%" (default 1). |
kategori | string | nonmewah (default, 12% x 11/12), mewah (luxury goods, 12% x price) or custom (needs tarif_persen). |
pembulatan | string | Round PPN to whole Rupiah: tidak (no, show sen), bawah (down), terdekat (nearest), atas (up). |
tarif_persen | number | string | Only for kategori=custom: rate in percent, e.g. 11 or "1,1". |