The Number Formatter adds thousands separators, currency symbols, percentages and compact suffixes to any number, in any locale — including Indian lakh and crore grouping such as 12,34,567. Paste one value or a whole column and see a dozen formats side by side, with matching code. Everything runs in your browser — nothing is uploaded.
How to format a number with commas
- Paste a number, or a list with one number per line. Loosely written values are accepted:
1,234.5,1.234,5,12,34,567,1_000,1e6,₹ 25,000and accounting negatives like(1,200). - Pick a locale and a style — decimal, currency, percent, compact and the others listed below. The comparison matrix updates with every change.
- Copy the formatted list, copy a single row from the matrix, or take the JavaScript, Python, Java or SQL snippet that produces the same output.
Examples
One number in every common format
The comparison matrix for 1234567.891:
US / UK (1,234,567.89) 1,234,567.891
Indian (12,34,567.89) 12,34,567.891
German (1.234.567,89) 1.234.567,891
French (1 234 567,89) 1 234 567,891
Swiss (1’234’567.89) 1'234'567.891
No grouping 1234567.891
Currency (INR) ₹12,34,567.89
Lakh / crore words 12.35 lakh
Compact 1.2M
Compact (en-IN) 12.3L
Scientific 1.235E6
Percent (×100) 123,456,789.1%A price list as Indian rupees
Locale en-IN, style Currency, currency INR:
1499
25000
1250000.5Result:
₹1,499.00
₹25,000.00
₹12,50,000.50The same list with locale de-DE and currency EUR becomes 1.499,00 €, 25.000,00 € and 1.250.000,50 € — the symbol position and separators follow the locale, not the currency.
Fixed decimals for a report
Locale en-US, style Decimal, minimum and maximum fraction digits both 2:
1234.5
-1234.5
0Result:
1,234.50
-1,234.50
0.00Options explained
The Number Formatter is a form-style workbench, so it has no registry settings drawer. These are its controls:
- Locale — a BCP 47 tag such as
en-US,en-IN,de-DEorfr-FR. It decides the grouping pattern, decimal mark and currency symbol placement. - Style — Decimal; Currency; Percent (multiplies by 100); Unit (for example kilobytes); Scientific; Engineering; Compact (
1.2M, or12.3Linen-IN); and Lakh/crore words (12.35 lakh). - Currency — an ISO 4217 code such as
INR,USDorEUR, used when the style is Currency. - Minimum and maximum fraction digits — pad or round the decimal part. Leave both empty to keep the digits you typed.
- Grouping — turn thousands separators off for machine-readable output.
- Sign display and Compact display — show
+on positive values, and choose short (12L) or long (12 lakh) compact names.
Common number formatting problems
A European value is read as the wrong number
With a single comma followed by exactly three digits, 1,234 is read as one thousand two hundred thirty-four. If you mean one point two three four, write 1.234, or pad the decimal part to 1,2340 so the comma cannot be a thousands separator.
Percent shows 100 times too much
The Percent style follows Intl and multiplies by 100, so 0.256 becomes 26%. Enter fractions, not whole percentages, or use Decimal and append % yourself.
Currency shows the wrong symbol position
Placement comes from the locale. EUR in de-DE prints 1.499,00 €; in en-IE the symbol goes first. Change the locale, not the currency, to move it.
Very large integers lose their last digits
Numbers are held as double-precision floats, exact only up to 9,007,199,254,740,991. 12345678901234567890 prints as 12,345,678,901,234,567,000. Keep IDs and account numbers as text.
A line was left unchanged
Lines that are not numbers, such as N/A, abc or a stray heading, are copied through as they are rather than turned into 0, and a notice lists them: "Lines 2, 3 are not numbers and were left unchanged." Blank lines are kept too, so the output still lines up with the input column.
Compact output looks too rounded
Compact and scientific styles keep one and three fraction digits respectively. Raise the maximum fraction digits to show more.
FAQ
How do I add commas to a number in JavaScript?
Use value.toLocaleString('en-US') or new Intl.NumberFormat('en-US').format(value). Both return 1,234,567.891 for 1234567.891. Pass options such as { maximumFractionDigits: 2 } to round, or { style: 'currency', currency: 'USD' } for money. The Code tab shows the exact call for whatever you configure here.
How do I show numbers in lakh and crore?
Choose the en-IN locale. Decimal style gives 12,34,567, Currency with INR gives ₹12,34,567.00, and the Lakh/crore words style gives 12.35 lakh. The same Intl.NumberFormat('en-IN') call works in any modern browser or Node.js, so there is no need for a custom grouping function.
What is the difference between a lakh and a million?
A lakh is 100,000 and a million is 1,000,000, so one million equals ten lakh. A crore is 10,000,000, or ten million, and one billion equals 100 crore. Indian financial reporting often writes large figures as "lakh crore" — one lakh crore is one trillion.
Why does my number show a space instead of a comma?
Some locales use a space as the grouping separator, and in current browsers French uses a narrow no-break space (U+202F): 1 234 567,891 only looks like it contains ordinary spaces. If you paste that output into code or a spreadsheet, the invisible character can break parsing. Switch the grouping off, or run the text through the Text Cleaner to normalize the spaces.
How do I format a number in Excel with Indian commas?
Use the custom format [>=10000000]##\,##\,##\,##0;[>=100000]##\,##\,##0;##,##0, which applies two-digit groups above one lakh. Excel has no built-in lakh grouping. Values formatted here and pasted into Excel arrive as text, so keep the raw numbers in the sheet and format the display column.
Are the numbers I paste stored anywhere?
No. Formatting uses the browser's built-in Intl data inside an isolated frame that blocks network requests. Your locale and style are remembered on this device; the numbers are not stored unless you turn on "Remember my last input".
Indian number format: lakh and crore
India groups the first three digits from the right, then every two: 1,00,000 is one lakh (100 thousand) and 1,00,00,000 is one crore (10 million). Browsers implement this in Intl.NumberFormat for the en-IN and hi-IN locales, and the formatter uses it directly.
| Value | en-US |
en-IN |
Words | Compact (en-IN) |
|---|---|---|---|---|
| 100000 | 100,000 | 1,00,000 | 1 lakh | 1L |
| 2500000 | 2,500,000 | 25,00,000 | 25 lakh | 25L |
| 10000000 | 10,000,000 | 1,00,00,000 | 1 crore | 1Cr |
| 125000000 | 125,000,000 | 12,50,00,000 | 12.5 crore | 12.5Cr |
| 1000000000000 | 1,000,000,000,000 | 10,00,00,00,00,000 | 1 lakh crore | 1LCr |
In code, new Intl.NumberFormat('en-IN').format(1234567) returns 12,34,567. Python needs Babel (format_decimal(value, locale="en_IN")), because the built-in {:,} only groups in threes. Java's java.text.NumberFormat supports a single group size and prints 1,234,567, so the Java snippet for en-IN uses ICU4J instead. Indian number format in code covers Java, Excel and SQL.
Related tools
Dates need their own patterns — try the Date Formatter. For time spans like 5415 seconds, use the Duration Formatter. Browse every tool in Date & Number.
Related tools
Guides
- Indian Number Format: Lakh and Crore in Code — How do I format numbers as lakh and crore?