Number Formatter (Intl.NumberFormat)
Everyday
A visual front-end for `Intl.NumberFormat`. Pick a locale (en-US, de-DE, ja-JP, …), a style (decimal, currency, percent, unit), a notation (standard, scientific, engineering, compact), and digit precision. The tool shows the formatted output and the exact JavaScript call that produced it, so you can paste it into your codebase. Helpful for previewing how prices, counts, percentages, or unit values will render in different markets.
Formatted
1,234,567.891
new Intl.NumberFormat('en-US', {
"style": "decimal",
"notation": "standard",
"useGrouping": true,
"minimumFractionDigits": 0,
"maximumFractionDigits": 3
}).format(1234567.891)All formatting uses your browser's built-in Intl.NumberFormat — same engine your production code will use.
How to use
- Type a number and pick a locale.
- Choose a style (decimal/currency/percent/unit) and adjust precision.
- Try compact notation for `1.2M` style summaries, scientific for `1.234E6`.
- Copy the formatted result or the matching JavaScript snippet.
Frequently asked questions
- Why does German format `1.234,56` with a comma decimal?
- Locale convention. German (`de-DE`) uses `.` as thousands separator and `,` as decimal — the opposite of US English. `Intl.NumberFormat` knows this for every locale, which is why hardcoding `toFixed()` and your own commas is fragile for international apps.
- What's compact notation for?
- Short labels — `1.2K`, `3.4M`, `5億` in Japanese. Use it for dashboards or chart axes where space matters and exact digits don't. Pair with `maximumFractionDigits: 1` for typical UI sizing.
- Why does percent show 100x what I typed?
- Percent style multiplies by 100. To format `0.42` as `42%`, that's the expected behavior; if you've already pre-multiplied to `42` and want `42%`, append a literal `%` instead of using percent style.
- Which currencies and units are supported?
- All ISO 4217 currency codes for currency style. For units, browsers support a defined sanctioned subset (meter, kilometer, mile, byte/megabyte, etc.) — this tool exposes the common ones. See MDN's Intl.NumberFormat options for the full list.
Related tools
Loan / Mortgage Calculator
Calculate the monthly payment, total interest, and full amortization schedule for any fixed-rate loan.
Compound Interest Calculator
Project how a starting balance grows with regular contributions, your interest rate, and your compounding frequency.
Age Calculator
Calculate exact age in years, months, days — and find your next birthday.
BMI Calculator
Calculate Body Mass Index from height and weight, with a healthy range.
Tip Calculator
Calculate the tip and split the total bill between people.
Percentage Calculator
Work out percentages, what-percent, and percent change in one place.