Tools
Guides

Number Formatter

Convert

Format numbers with Intl.NumberFormat — thousands separators, scientific notation, precision and currency, for any locale.

100% client-side No backend
Output
On this page

What is a number formatter?#

The same number is written differently in different places. 1234567.89 in US English is 1,234,567.89; in German it is 1.234.567,89 (periods and commas swap roles); in Hindi it is 12,34,567.89 (grouped in lakhs of two digits, not thousands of three); in compact English it shrinks to 1.23M. None of these is “wrong” — each is the correct local convention, and getting it right matters for receipts, dashboards, and any figure a human reads.

This page is a live front-end to the browser’s native Intl.NumberFormat, the same engine production apps use. You give it a raw number and pick a style (plain decimal, currency, or percent), a notation (standard, scientific, engineering, or compact), a locale, fraction-digit bounds, and a grouping toggle. It renders the correctly localized string instantly, with no hand-written separator tables to go stale.

How to use it#

  1. Type a Value (the page boots with 1234567.89). Plain decimals and scientific notation like 1.23e5 both work; grouped input such as 1,000 is intentionally rejected so ambiguous text is never silently re-formatted.
  2. Pick a Style: decimal (plain number), currency (reveals the currency picker — USD, EUR, GBP, JPY, CNY, INR and more, all ISO 4217 codes), or percent (multiplies by 100 and adds the locale’s percent sign).
  3. Pick a Notation: standard, scientific (1.23E6), engineering (exponent always a multiple of 3), or compact (1.23M, 1.23亿).
  4. Pick a Locale from the representative list (en-US, zh-CN, de-DE, hi-IN, ja-JP …). The output re-renders the moment you change it.
  5. Tune Min digits / Max digits (0–20) and the Grouping checkbox (thousands separators on or off). The Output box updates live; Copy grabs it.

Key features#

  • Browser-native Intl. Uses the same Intl.NumberFormat your runtime ships, so the output matches what a real localized app produces — no third-party formatting library, no drifted lookup table.
  • Locale-correct grouping. Handles Western thousands grouping (1,234,567), Indian lakh grouping (12,34,567), Chinese four-digit grouping (123,4567-style), and the German period/comma swap automatically once you pick the locale.
  • Compact and engineering notations. Compact collapses large values to 1.23M / 1.23B (or 123万 / 12亿 in CJK locales); engineering keeps the exponent on a multiple of 3, which lines up neatly with SI prefixes.
  • Currency and percent built in. Currency accepts any ISO 4217 code and places the symbol/label where that locale expects (before or after the digits); percent applies the locale’s own percent sign and spacing.
  • Fraction-digit control. Pin minimum and maximum fraction digits (0–20) to force trailing zeros or cap noisy decimals — the same knobs Intl.NumberFormat exposes.

Worked example#

With the default 1234567.89, style decimal, notation standard, grouping on, switch only the Locale and watch the separators change:

en-US:   1,234,567.89
de-DE:   1.234.567,89
hi-IN:   12,34,567.89

The German row swaps . and , versus the US row. The Hindi row groups the last six digits as 12,34,567 — a lakh is one hundred thousand, so Indian convention groups in 2-2-3 from the right rather than 3-3-3. Both are correct for their locale; a hand-coded formatter usually gets one of them wrong.

Now switch notation to compact and the same value collapses:

en-US:   1.23M
zh-CN:   123.46万
ja-JP:   123万

English uses the SI-style M (million); Chinese and Japanese use the native 万 (ten thousand) unit, so 1,234,567 lands at “123.46 ten-thousands” rather than “1.23 millions” — the same quantity, four different culturally-expected renderings.

FAQ#

Why is my grouped input like 1,000 rejected?#

Because the comma is ambiguous: in en-US it is a thousands separator, but in de-DE it is the decimal point. Accepting it would mean silently guessing the locale of the input. The tool instead takes a raw numeric value and applies your chosen locale’s grouping on output — unambiguous in both directions.

Why does compact mode show 1.23M in English but 123.46万 in Chinese?#

Because compact notation uses each locale’s own magnitude words. English counts in thousands, millions, billions (powers of 1000); Chinese and Japanese count in 万 (ten-thousand) and 亿 (hundred-million), which are powers of 10000. The underlying number is identical; only the conventional grouping unit differs.

When would I use engineering notation instead of scientific?#

Both express a number as a mantissa times a power of 10, but engineering forces the exponent to a multiple of 3 (1.234567 × 10⁶, not 1.234567 × 10⁶.something), which maps directly onto SI prefixes (kilo, mega, giga…). Reach for it when the output will sit next to physical units; use scientific when you just want a compact, normalized form.

Does the currency option convert exchange rates?#

No. Currency mode only formats — it writes 1234.56 as $1,234.56 (en-US) or 1.234,56 € (de-DE) using the locale’s symbol placement. It does not convert USD to EUR. Exchange rates change by the minute and would require a live data feed this page deliberately does not have.