Number Formatter (Intl.NumberFormat)
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.
Guides on this topic
Related tools
Percentage Calculator
Work out percentages, what-percent, and percent change in one place.
Discount & Sale Price Calculator
Calculate the sale price after a percent or fixed discount — plus tax, savings, and effective discount rate.
IBAN Validator
Validate an International Bank Account Number — checks country code, length, and the mod-97 checksum. Supports 75+ countries.
Credit Card Validator (Luhn + Brand)
Validate a card number with the Luhn checksum, detect brand (Visa/MC/Amex/etc), and check expected length. Local, no network.
ISBN Validator (ISBN-10 / ISBN-13)
Validate ISBN-10 and ISBN-13 checksums and convert between the two formats. Hyphens and spaces are handled.
Fibonacci Sequence Generator
Generate the first N Fibonacci numbers — 0, 1, 1, 2, 3, 5, 8 … — with exact big-integer precision, and see the last term, the running sum and the golden-ratio approximation of the final two terms.