AZ Tools

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

JavaScript
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

  1. Type a number and pick a locale.
  2. Choose a style (decimal/currency/percent/unit) and adjust precision.
  3. Try compact notation for `1.2M` style summaries, scientific for `1.234E6`.
  4. 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