Skip to content

Portuguese Number to Words JavaScript

4 Portuguese locales — Brazil, Portugal, Angola, Mozambique.

LocaleCountryCurrency
pt-BRBrazilReal
pt-PTPortugalEuro
pt-AOAngolaKwanza
pt-MZMozambiqueMetical

Install

bash
npm install to-words

Basic Conversion

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

const tw = new ToWords({ localeCode: 'pt-BR' });
tw.convert(12345); // "Doze Mil Trezentos E Quarenta E Cinco"
tw.convert(1234.56, { currency: true }); // "Mil Duzentos E Trinta E Quatro Reais E Cinquenta E Seis Centavos"

FAQ

Q: Is there a difference between pt-BR and pt-PT?
A: Yes — primarily currency and minor spelling conventions.

Released under the MIT License.