Currency formatting on JavaScript ES6
Ken Bramasta1 min read
Easy way to convert integer into currency formatting

Guide for the parameter#
Let's talk about the parameters. It's made up of the locales and the options object.
Parameter: Locales#
First, you have the locales, this is the language and region settings. It is made up of language code and the country code.
list of the Language code
list of the Country code
Parameter: Options#
There are tons of options, but let's just talk about the two that we're using: styles, and currency.
Options: Style
The style is the easy part. This is the style for your number formatting. Since this is a currency blog, our choice would be currency. The 3 possible values are:
- decimal (plain number formatting, the default)
- currency (currency formatting, what we're using)
- percent (percent formatting)
Options: Currency
Obviously, there are tons of currency options. You can see the full list here
Here are some examples:
- CAD (Canadian dollar)
- USD (US dollar)
- EUR (Euro)
- CNY (Chinese RMB)
Resources#
- MDN Web Docs - Intl.NumberFormat
- w3schools: Language Codes
- w3schools: Country Codes
- Current currency & funds code list
Enjoyed this post?#
Check out some of my other articles:

Tend to this garden with me
Get clean, markdown-first engineering dispatches. No spam, ever.