Number Formatter
Format a number the way a country writes it, with the right thousands and decimal separators, or as currency, a percent, compact (1.2M), scientific or engineering notation. Compares 14 locales and gives the JavaScript code.
How to Use
- Type the number. Every digit is kept, even for 20-digit numbers.
- Choose the locale, then the style: number, currency, percent, compact, scientific or engineering.
- Optionally set the minimum and maximum decimal places, or turn grouping off.
- Read the formatted result and which separators the locale uses; the big display colours each separator.
- The table shows the same number in 14 locales and the exact Intl.NumberFormat code to reproduce it.
Worked Example
One number, four countries. 1234567.891 is written 1,234,567.891 in the United States, 1.234.567,891 in Germany, 1 234 567,891 in France (with narrow no-break spaces) and 12,34,567.891 in India, where the digits after the first thousand are grouped in twos.
Currency. 1234.5 euros in German is 1.234,50 €: two decimal places because euros have cents, and the symbol after the amount with a space. The same amount in Irish English is €1,234.50.
The common mistake: reading 1.234 as one point two three four. In a German price list 1.234 means one thousand two hundred and thirty-four. When numbers cross borders, check the locale before trusting a full stop or a comma.
Show Work
Separators by Region
Points, Commas and Spaces
The split goes back to the 17th century. John Napier used both a point and a comma for decimals; the point stuck in England after Napier’s logarithm tables, while much of continental Europe adopted the comma, partly because Leibniz used the point (·) for multiplication. Each choice forced the other symbol into the thousands position.
In 2003 the General Conference on Weights and Measures declared both the point and the comma acceptable decimal markers, and recommended grouping digits only with thin spaces, so that 1 000 can never be misread. Software follows the Unicode CLDR database, which records the conventions of hundreds of locales.
About This Formatter
This formatter uses your browser’s built-in Intl.NumberFormat with the number passed as text, so long numbers keep every digit instead of being rounded to a float. It shows the formatted result, names the exact separator characters (including no-break spaces), compares 14 locales at once and writes the JavaScript call that produces it.
Everything runs in your browser; nothing is sent anywhere.
Related calculators: Rounding Calculator, Scientific Notation Converter, and Number Base Converter.
Frequently Asked Questions
Which countries use a decimal comma?
Most of continental Europe and South America write 1.234,56 or 1 234,56, with a comma for the decimal point. The UK, US, Ireland, India, China, Japan, Australia and most English-speaking countries use a decimal point and comma grouping: 1,234.56. Switzerland uses an apostrophe for grouping: 1'234.56.
Why does India write 12,34,567?
The Indian numbering system groups the first three digits, then every two: 12,34,567 is twelve lakh thirty-four thousand five hundred and sixty-seven. A lakh is 1,00,000 (one hundred thousand) and a crore is 1,00,00,000 (ten million), so ₹5 crore is ₹5,00,00,000.
What separator does French use?
A space, specifically a narrow no-break space (U+202F), so 1 234 567,89 never breaks across two lines. Copying it into a spreadsheet or code can cause errors because it isn’t an ordinary space; this tool names the exact character each locale uses.
What do compact and engineering notation mean?
Compact notation shortens large numbers for display: 1,234,567 becomes 1.2M in English, 123万 in Japanese and 12 lakh in Hindi. Engineering notation is scientific notation with the exponent a multiple of 3, matching kilo, mega and giga: 1.234567E6 rather than 1.234567 × 10⁶ scientific.
How do I format numbers in code?
In JavaScript use Intl.NumberFormat: new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(1234.5) gives 1.234,50 €. Python has format(1234567.891, ',') for comma grouping and the babel library for locales; Excel uses format codes such as #,##0.00. This tool writes the JavaScript call for whatever you choose.
How do I use the Number Formatter?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Invoices abroad
1234.5 euros in Germany is 1.234,50 €.
Indian figures
1234567 rupees is ₹12,34,567.00.
Dashboards
1,234,567 users shown compact as 1.2M.
Percentages
0.256 shown as a percent is 25.6%.
Developers
Copy the exact Intl.NumberFormat call for the format chosen.
Last updated: