Decimal and Grouping Separators in Number Formatting

How decimal and grouping separators vary by locale, what number formatting actually changes, and when to keep numbers plain for copying, parsing and accessibility.

When you format numbers for readers, two characters do most of the work: the decimal separator, which marks where the fractional part begins, and the grouping separator, which breaks long integers into readable chunks. In US English these are the period and the comma, as in 1,234.56. Many other locales swap or replace them. The same string can therefore mean very different values depending on who reads it. This review explains what separator formatting changes, when it helps, and when an unformatted plain number is the safer choice.

Is locale-aware number formatting suitable for your use?

Formatting with locale-appropriate separators is a good fit when the output is meant for people to read in a known locale. Examples include reports, invoices, dashboards and interface labels. The main benefit is readability: grouped digits are easier to scan, and readers see the conventions they expect.

The decisive tradeoff is ambiguity once the text leaves that context. A formatted number is a display string, not a value. Another person, program or locale may read it differently, or fail to read it at all. The string 1.234 is one thousand two hundred thirty-four under German conventions, but just over one under US conventions.

Plain, unformatted numbers are preferable in these cases:

  • Data exchange formats such as JSON, where the number syntax allows only a period as the decimal mark and no grouping characters.
  • CSV files, where a comma decimal separator collides with the comma field delimiter.
  • Values that will be pasted into spreadsheets, calculators or code, which may parse them under a different locale.
  • Identifiers that look numeric, such as account numbers, postal codes or years, which should not be grouped at all.
  • Any context where the audience's locale is unknown and the value must be unambiguous.

A practical rule is to store and transmit the raw value, and apply separators only at the final display step for a specific locale.

What number formatting actually changes

In this context, "formatting" can mean two different things. Confusing them causes most separator problems.

  • Presentation-only formatting: a spreadsheet cell format or a display layer changes how a stored numeric value appears, while the underlying value stays a number. Changing the format, or opening the file under another locale, changes the display without altering the value.
  • Character-level formatting: the number is converted into a text string containing specific separator characters. From then on, those characters are stored data. Anything that later reads the string has to interpret them.

Custom number formatting in spreadsheets usually belongs to the first category. A format code such as #,##0.00 says to group the integer part and show two decimal places. In common spreadsheet applications, the separators actually displayed follow the application's or system's locale settings rather than the literal characters in the code. Exact behavior differs between products and settings, so check it in the application you use. Exporting to text, or using a text function, moves the result into the second category.

Separator conventions vary in which characters are used and in where the groups fall:

Convention | Example of one million and a fraction | Notes
US English | 1,234,567.89 | Comma groups thousands, period marks decimals
German and many other European locales | 1.234.567,89 | Roles of period and comma are reversed
French | 1 234 567,89 | Groups separated by a space character, comma decimal
Swiss German | 1’234’567.89 | Apostrophe-style grouping mark, period decimal
Indian English | 12,34,567.89 | First group of three, then groups of two (lakh and crore grouping)

The space-like and apostrophe-like separators are often not the characters a reader would type. Locale data commonly uses a no-break space (U+00A0) or a narrow no-break space (U+202F) rather than an ordinary space. These keep a number from being split across lines. The Swiss grouping mark is often the right single quotation mark (U+2019) rather than the ASCII apostrophe. Arabic-script locales may use dedicated characters such as the Arabic decimal separator (U+066B) and Arabic thousands separator (U+066C). Where right-to-left text is involved, bidirectional display rules also affect how the digits and surrounding text appear on screen. In those cases, visual order and stored order should be checked separately.

Locale-aware formatting APIs generate these strings from shared locale data. The snippet below shows the JavaScript Intl.NumberFormat interface. The commented results reflect typical output from current Common Locale Data Repository data. The exact characters, especially spaces and apostrophes, can differ between runtime and data versions. They were not verified for this article and should be checked in your own environment.

const n = 1234567.891;

new Intl.NumberFormat('en-US').format(n); // typically "1,234,567.891"
new Intl.NumberFormat('de-DE').format(n); // typically "1.234.567,891"
new Intl.NumberFormat('fr-FR').format(n); // typically "1 234 567,891" (narrow no-break spaces)
new Intl.NumberFormat('en-IN').format(n); // typically "12,34,567.891"
new Intl.NumberFormat('de-CH').format(n); // typically "1’234’567.891"

Reversal and combining-mark issues do not apply here. Separator formatting inserts or substitutes characters, but it does not reorder the digits in storage.

Will formatted numbers stay readable and usable after copying or sharing?

Copying a formatted number copies the display string, including its separator characters. Several practical problems follow from that.

  • Parsing: many programs do not reverse locale formatting automatically. In JavaScript, Number("1,234") returns NaN, and parseFloat("1,234.5") stops at the comma and returns 1. Spreadsheets may treat a pasted value as text, or read it under the wrong locale, if the separators do not match their settings.
  • Misreading across locales: a value with a single separator and three trailing digits, such as 1,234 or 1.234, is ambiguous without knowing the source locale.
  • Search and matching: a search for 1 000 typed with an ordinary space may not match text containing a no-break or narrow no-break space. Neither may match 1000 or 1,000. Whether a search tool normalizes these characters depends on the tool.
  • Editing: invisible differences between space characters, or between an apostrophe and a quotation mark, are hard to spot. They can break find-and-replace operations or validation rules.
  • Font and rendering support: narrow no-break space and the Arabic separator characters need font support. Fallback rendering varies by platform. This review does not include a test of specific destinations.

Accessibility is an open question rather than a settled one. Screen readers generally try to announce formatted numbers as whole values. However, how a given screen reader handles a particular separator depends on the product, its version, its speech settings and the document language. A mismatch between the text's language setting and its separators could plausibly cause a number to be read as several separate numbers. No documentation or scoped test for specific assistive technologies was available for this review, so treat this as a risk to check, not a confirmed behavior. Marking up the content language correctly, and using the separators expected for that language, reduces the chance of a mismatch.

A plain-text equivalent is needed whenever the number will be processed rather than only read. The safest form is digits with a period decimal and no grouping, such as 1234567.89. Use it for anything handed to software, and for content shared with an audience whose locale is unknown. If a human-readable version is also wanted, show the formatted string for display and keep the raw value alongside it or behind it.

Evidence gaps

This review relies on general, verifiable conventions and documented programming behavior. It includes no measurements, product comparisons or hands-on tests. Specific outputs vary with locale data versions, application settings and platforms. These include the characters produced by a given formatting library, how a particular spreadsheet or messaging app treats pasted separators, and how individual screen readers announce them. Confirm them in the environments you actually depend on.