Normalize numbers written with mixed decimal and thousands separators

Turn 1.234,56, 1,234.56 and 12,34,567.89 into plain numbers, with the decimal mark worked out from the whole list.

How it works

  1. Paste your numbers, one per line
  2. Check the decimal mark the tool found and the rows it flags
  3. Copy the plain numbers or pick a locale style

How the decimal mark is told apart from the thousands sign

To turn numbers such as 1.234,56, 1,234.56 and 12,34,567.89 into plain numbers, the tool finds which sign is the decimal mark by reading every line, then rewrites each line with a dot for decimals and no grouping. Within one number the rules are exact. When a dot and a comma both appear, the last one is the decimal mark and the other groups thousands. A sign that repeats, as in 1,234,567, groups thousands. A space, a no-break space or an apostrophe between digits always groups thousands, so 1 234,56 and 1'234.56 are clear. A lone sign with a number of digits after it other than 3, such as 12,5, is a decimal mark. A lone sign after a leading zero, as in 0,123, or after more than 3 digits, as in 1234,567, is also a decimal mark. That leaves one honest ambiguity: a single dot or comma followed by exactly 3 digits, such as 1,234. It is either thousands (1234) or decimals (1.234). The tool settles it with the rest of the list: if other lines prove that the comma is the decimal mark, 1,234 is read as 1.234; if they prove the dot is, it is read as 1234. If no line proves anything, the setting If nothing settles 1,234 decides, thousands by default, and the row is marked as a guess.

A worked example

The page opens with eight lines: 1.234,56, € 2.500,00, (1 234,50), 12,5%, 1,5E3, 1.234, 9.876,5- and n/a. Six of them prove that the comma is the decimal mark. The first, the second and the seventh have both signs, with the comma last; the third has a space that groups and a comma after it; 12,5 and 1,5E3 have one comma with a single digit after it. So the list is comma-decimal, and the lone 1.234 is read as 1234, not 1.234, because a dot cannot be the decimal mark here. The results are 1234.56, 2500.00, -1234.50, 12.5, 1500, 1234 and -9876.5; the last line, n/a, is not a number and is left blank. The sum of the seven numbers is -4629.94, the smallest is -9876.5 and the largest is 2500. Change the Decimal mark setting to Dot and 1.234 stays 1.234 in the same list.

What else it reads and how it writes

Currency signs and codes are removed from either end: $1,234.50, 1.234,50 €, USD 1,234.50 and Rs. 12,34,567 all work. A negative number can use a leading minus, a minus at the end as in 1.234,50-, or round brackets as in (1,234.50). A percent sign is dropped, so 12,5% becomes 12.5, or 0.125 if you choose Divide by 100. Scientific notation such as 1.5E3 or 1,5e-3 is expanded exactly, up to an exponent of 300. Indian grouping such as 12,34,567.89 is recognised: groups of 2 digits with a last group of 3. Digits in Arabic-Indic, Persian and fullwidth forms are read as ordinary digits. For output you can keep plain numbers, use a comma decimal, or write each number in the style of English (US), English (India), German, French, Swiss, Spanish, Portuguese (Brazil), Russian or Swedish. The separators come from Unicode CLDR 44.1.0. Spanish does not group four-digit numbers, so 1234 stays 1234 there. Decimal places can be fixed at 0 to 4, rounding half away from zero.

Limits

Each line is one number of at most 60 characters, and up to 50,000 lines are accepted. Dates, phone numbers and text with several numbers on a line are not numbers here and are listed as failed rows with a reason that never repeats your text. Sums, smallest and largest are computed in double precision and shown to 15 significant digits, while the converted lines keep the significant digits you typed when Decimal places is As written. Leading zeros are dropped (007 becomes 7), and choosing 0 to 4 decimal places rounds half away from zero. A grouping that looks like a typo, such as 1,234,56, is refused instead of being guessed. The tool cannot know which convention a source uses when the whole list contains only lone signs followed by 3 digits; it says so in the report. An AI agent can open this page with the numbers prefilled by adding #input= and the URL-encoded text to the address.

Frequently asked questions

How do I convert 1.234,56 to 1234.56?

Paste the number, or a whole column of them, with one per line. The tool sees that the comma comes last and treats it as the decimal mark, then writes 1234.56. Copy the result column. Choose Plain, comma decimal under Write numbers as if you need 1234,56 for a spreadsheet that uses the comma.

Is 1,234 one thousand two hundred thirty-four or 1.234?

On its own it could be either. The tool checks the other lines: a line such as 1,234.56 shows the dot is the decimal mark, so 1,234 is 1234; a line such as 1.234,56 shows the comma is, so 1,234 is 1.234. With no evidence it uses your default, thousands unless you change it, and lists the row as a guess.

Does it read Indian numbers like 12,34,567.89?

Yes. Groups of 2 digits with a last group of 3 digits are recognised as Indian grouping, so 12,34,567.89 becomes 1234567.89. Choose English (India) under Write numbers as to write plain numbers back in that style.

How are negative numbers in brackets or with a trailing minus read?

(1 234,50) and 1.234,50- both become -1234.50, and so does -1.234,50. A number with two negative marks, such as (-5), is refused and listed with the reason.

How do I write 1234567.89 as 1.234.567,89 or 12,34,567.89?

Pick the style under Write numbers as: German gives 1.234.567,89, English (India) gives 12,34,567.89, French uses a narrow no-break space and a comma, and Swiss uses an apostrophe and a dot. The tool also applies the style to the sum, smallest and largest.

Is my text uploaded?

No. It is processed in your browser, in this tab, and no server receives it. Your choices are saved in this browser, the text is not.