TextToolbox
HomeAdd Commas to Numbers

Add Commas to Numbers

Group long numbers in US, German, Indian or Swiss style, or show them as dollars with two decimals. Use one number per line; sentences are not scanned.

Built by Saurabh Kumar

Quick Answer

Format complete decimal digit strings using US, German, Indian or Swiss grouping. Ordinary modes preserve signs, leading zeros and fractional digits. Dollar display rounds explicitly to two decimals. General prose is not scanned.

Format one decimal value per line, or explicit Label: value lines. Choose input notation separately from display style. General prose, dates, IDs, comma-separated lists and scientific notation are not automatically scanned.

Formatting choices

Signs, digit precision and leading zeros are preserved in ordinary display modes. Dollar display explicitly rounds half away from zero to two decimals, drops leading zeros and shows no minus sign for an amount that rounds to $0.00; it does not convert currencies. Remove grouping outputs an ungrouped dot-decimal value.

Formatted values: 0. Output length: 0 UTF-16 units. Blank lines, outer whitespace, labels and CRLF/LF/CR endings are retained. Any invalid value blocks the whole output.

Grouping Digits Without Converting to a Number

The tool regroups the digits of a number you paste: 1234567 becomes 1,234,567, or 12,34,567 in the Indian style. It works on the digits as text, so it never turns your value into a computer number. That is why very long numbers and tiny decimals come out exactly as you typed them, with signs, decimal digits and leading zeros kept. Dollar display is the one exception: it rounds to cents on purpose.

Why 1,234 Needs a Notation Choice

The text 1,234 can be the whole number one thousand two hundred thirty-four, or one and 234 thousandths, depending on the notation. The tool follows the notation you choose and does not guess.

A list of numbers separated by commas is not grouped input. Dates, web addresses, version numbers, currency symbols, accounting parentheses, exponents and digits from other scripts give an error. Nothing is half-replaced. The tool is meant for display. Do not use it to prepare IDs or to parse CSV files.

Six Inputs, Six Display Choices

Explicit input and display choices
Input and notationOutput modeResult
9007199254740993, ungroupedStandard9,007,199,254,740,993
0.0001, ungroupedStandard0.0001
1.234,5600, GermanStandard1,234.5600
1234567.89, ungroupedIndian12,34,567.89
-1.005, ungroupedDollar display-$1.01
1,23,456, IndianRemove grouping123456

Choosing the Input Notation and Display Style

  1. Pick the notation your numbers are written in now, not the one you want.
  2. Paste one number per line, or choose the Label: value option for lines like "Total: 1234".
  3. Pick the display style and check the output.
  4. Copy or download the whole result.

How Values Are Read and Regrouped

Each value must be a complete number written with plain digits 0 to 9, with an optional plus or minus sign. A decimal that starts with a point, such as .5, is allowed and gets a zero in front. A number that already has separators must follow the notation you picked.

Dollar display rounds to cents using whole-number math, so 999.995 becomes $1,000.00. It drops leading zeros, and an amount that rounds to $0.00 shows no minus sign.

German style means dots between groups and a comma for decimals. It does not cover every European format. Swiss style uses the plain apostrophe, not a typographic one. The limits are 1,000,000 UTF-16 units, 20,000 lines and 10,000 digits in one value. When an error appears, no partial result is shown.

Keep your original values and check the notation before you replace anything. Use the normal modes when every decimal matters, and choose dollar display only when rounding is what you want.