Skip to content

Filipino Number to Words in JavaScript (fil-PH) โ€‹

Use fil-PH when your application needs Filipino number words for Philippine invoicing, checkout flows, or legal documents that print totals in full words.

Locale codes: fil-PH ยท Numbering system: Short scale ยท Currency: Piso / Sentimo ยท Script: Latin

Install โ€‹

bash
npm install to-words

Basic Conversion โ€‹

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

const tw = new ToWords({ localeCode: 'fil-PH' });

tw.convert(100);
tw.convert(1000);
tw.convert(1000000);

Currency - Piso / Sentimo โ€‹

js
tw.convert(1234.56, { currency: true });
tw.convert('500.00', { currency: true, includeZeroFractional: true });

Ordinal Numbers โ€‹

js
tw.toOrdinal(1);
tw.toOrdinal(10);
tw.toOrdinal(100);

Tree-shakeable (single-locale) import โ€‹

js
import { toWords, toCurrency, toOrdinal } from 'to-words/fil-PH';

toWords(1000);
toCurrency(999.99);

Locale Codes โ€‹

Locale codeCountryCurrencyNotes
fil-PHPhilippinesPiso / SentimoStandard Filipino (Tagalog-based) number wording

FAQ โ€‹

Q: Which locale code should I use for Filipino number-to-words output? Use fil-PH.

Q: Does to-words support Filipino ordinal words? Yes. fil-PH includes ordinal mappings so toOrdinal() works without any custom suffix logic.

Released under the MIT License.