Developer tools

Locale format tester.

Enter a number, a date and up to six locales, and see how the browser's Intl API formats them side by side: decimals, currency, percent, compact and unit styles, dates, plural categories and relative time. Copy the matching code snippet when the output is what you want.

Source: ECMA-402 (Intl), CLDR dataReviewed 2026-09-30

Advertisement

Values and locales

Checking your browser's Intl support…

Side-by-side output

Loading…

Code snippets (first locale)

Worked example and notes

Worked example. With the defaults (1234567.891, EUR, 2026-09-30 14:05 UTC), ICU 78.2 with CLDR 48.0 (as shipped in Node.js) prints 1,234,567.891 in en-US, 1.234.567,891 in de-DE, 12,34,567.891 in en-IN (lakh grouping) and Arabic-Indic digits ١٬٢٣٤٬٥٦٧٫٨٩١ in ar-EG. The currency cell shows €1,234,567.89 in en-US but 1.234.567,89 € in de-DE: symbol position, spacing, separators and digits all come from the locale, not from the currency. Your browser may print slightly different strings.

How it works. Each cell is one standard constructor call: Intl.NumberFormat (decimal, style: "currency", "percent", "unit", notation: "compact"), Intl.DateTimeFormat with dateStyle and timeStyle, Intl.PluralRules (cardinal and ordinal) and Intl.RelativeTimeFormat with numeric: "auto". The percent column divides your number by 100 first, so 50 shows as 50%. Nothing is computed by this tool beyond calling those APIs.

Browser ICU caveat. ECMA-402 defines the API but leaves the exact output to the implementation. Browsers ship their own ICU/CLDR data, which pages cannot read directly, so identical code can print different strings across browsers and versions, and an unsupported locale silently falls back to a default. Treat on-screen output as a check of your own browser only, and test your target browsers before hard-coding expected strings in tests.

Sources

Last reviewed 2026-10-26: ECMA-402, ECMAScript Internationalization API Specification; MDN Intl reference; Unicode CLDR for plural categories and locale patterns; RFC 5646 (BCP 47) for locale tags. Valid unit identifiers are the sanctioned units listed in ECMA-402. Nothing is sent from your browser.

Same number, three North American locales

If you ship to the US and Canada, the cases that cause bugs are en-US, en-CA and fr-CA. This table is real output from Node.js 24.15 (ICU 78.2, CLDR 48.0) for the number 1234567.891, the amount 1234.5 as Canadian dollars, the value 0.256 as a percent, and 4 March 2026 at noon UTC. Your browser may print slightly different strings.

LocaleNumber1234.5 CAD0.256 percentLong dateShort date
en-US1,234,567.891CA$1,234.5026%March 4, 20263/4/26
en-CA1,234,567.891$1,234.5026%March 4, 20262026-03-04
fr-CA1 234 567,8911 234,50 $26 %4 mars 20262026-03-04

What to take from it: the same currency code gives different symbols (CA$ in en-US, $ in en-CA) because the locale decides how to show the currency. fr-CA puts the amount first and the symbol after, with a comma for decimals and spaces between thousands. The spaces in fr-CA output are no-break spaces, and the percent sign has one in front of it. The short date for en-US is month first, while en-CA and fr-CA print year first. Notice that the percent column rounded 25.6% to 26%: set maximumFractionDigits if you need the decimal.

What this does not tell you: which format your users expect. A French-speaking user in the US may want fr-CA or fr-FR, and the locale you pick is a product decision, not something the browser can settle for you.

Why plural rules need more than one and other

Output of Intl.PluralRules for the counts 0, 1, 2, 3, 5, 11, 21 and 22, from the same Node.js build:

Locale01235112122
enotheroneotherotherotherotherotherother
rumanyonefewfewmanymanyonefew
plmanyonefewfewmanymanymanyfew
arzeroonetwofewfewmanymanymany

A message catalog with only a singular and a plural form is right for English and wrong for the other three. Note that in Russian 21 is one, the same category as 1, so you cannot write “if the count is 1” in code. Always call select() and look up the form by category.

Common mix-ups

  1. Unicode CLDR charts: Language Plural Rules

Checked against these sources on .

Frequently asked questions

Why does the same code print different text in two browsers?

Intl delegates to the ICU and CLDR data bundled with each browser or runtime. When CLDR changes a pattern or a short month name, browsers pick it up on their own release schedule, so output can differ between Chrome, Safari and Firefox and between versions of each. Test the browsers you support.

What are the dots shown inside some results?

Many locales put a no-break space or narrow no-break space between a number and its currency or percent sign, and between thousands groups in French. They look like ordinary spaces, so the tool marks them with a dotted character. Copy the snippet, not the on-screen text, if you need the exact characters.

Why is the date interpreted in UTC by default?

A date-time picker has no zone, so the tool treats your entry as UTC and then formats it in the zone you choose. That keeps results reproducible across machines. Pick a zone to see the shifted wall-clock time.

What does the Plural column mean?

It is the CLDR plural category (zero, one, two, few, many, other) that Intl.PluralRules returns for the count in the plural field. English only uses one and other. Arabic, Russian and Polish use more categories, which is why message catalogs need per-language plural forms. The ordinal column is the same for 1st, 2nd, 3rd style rules.

Is anything sent to a server?

No. Everything runs through the Intl object in your browser and nothing is uploaded.

Advertisement
Advertisement