Number Formatter Text
Add thousands separators, fix decimal places, or convert between number formats used in different countries.
Number Formatter is a free online tool that add thousands separators, fix decimal places, or convert between number formats used in different countries. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.
- Price
- Free — no account, no quota, no watermark
- Category
- Text
- Where it runs
- In your browser, on your device
- Files uploaded
- None
- Technology
- plain JavaScript
- Settings
- 5
- Works offline
- Yes, after the first visit
About Number Formatter
Half the world writes 1,234.56 and the other half writes 1.234,56, which is the reason spreadsheet imports go wrong in ways nobody notices until the totals are audited. Read a European decimal comma as a thousands separator and your figure is off by a factor of a thousand in the direction that looks plausible. This reads either convention — whichever separator appears last is the decimal point — and writes whichever you need.
How to use it
- Paste the text you want to run through number formatter.
- Set output format, decimal places and keep the original decimal places instead and the remaining options.
The 5 settings
| Setting | What it does | Default |
|---|---|---|
| Output format | Choose from 5: 1,234,567.89 — US and UK, 1.234.567,89 — most of Europe, 1 234 567,89 — France, Nordics, 12,34,567.89 — Indian lakh/crore, 1234567.89 — no separators. | 1,234,567.89 — US and UK |
| Decimal places | Range 0–10. | 2 |
| Keep the original decimal places instead | On or off. Off by default. | Off |
| Prefix | Free text. | — |
| Suffix | Free text. | — |
Under the hood
| Runs on | plain JavaScript — runs the whole thing |
| Controls | Output format, Decimal places, Keep the original decimal places instead, Prefix, Suffix |
Questions
How does it know which convention my input uses?
By position: in any correctly written number the decimal separator comes last. "1.234,56" must be European because the comma is rightmost; "1,234.56" must be Anglo-American for the same reason. A number with only one separator and three digits after it is genuinely ambiguous, and is read as a thousands separator.
What is the Indian format?
Grouping by two after the first three digits — 12,34,567 rather than 1,234,567 — reflecting lakh (100,000) and crore (10,000,000). It is standard across South Asia and unsupported by a lot of software that assumes groups of three.
Why does the space format use a special character?
It uses a narrow no-break space, which is the typographically correct separator in French and Nordic convention and, more usefully, prevents a number breaking across a line. A plain space would let "1 234" wrap into two lines.