Tool Hub

Number Formatter

Preview Intl.NumberFormat output for currency, decimal, percent, and units

Preview the combined effect of Intl.NumberFormat options. Compare how the same number renders across locales, styles, and digit settings — copy the resulting code straight into your app.

Override

1,234,567.89

Code
new Intl.NumberFormat("en-US", {
  "style": "decimal",
  "minimumFractionDigits": 0,
  "maximumFractionDigits": 2
}).format(number)

How to use

  1. Enter a number in the number field.
  2. Choose a locale from the dropdown (e.g. en-US, de-DE) or type any BCP 47 tag in the override field.
  3. Select a style: decimal, currency, percent, or unit.
  4. For currency style pick a currency code; for unit style pick a unit such as kilometer-per-hour.
  5. Adjust min and max fraction digits to control decimal precision.

Examples

  • Entering 1234567.89 with locale de-DE and style decimal produces 1.234.567,89.
  • Entering 0.0523 with locale en-US, style percent, and 1 max fraction digit produces 5.2%.

Verify outputs before using in production. No warranty — see Terms.