Intl Format Previewer
Preview how the JavaScript Intl API formats numbers, currencies, dates, lists and plurals in any locale, side by side.
Everything updates live โ no button to press.
Formatted output per locale
| Locale | Output | Copy |
|---|
JavaScript for the first locale
What this previewer does and does not do
Every value on this page comes from the ECMA-402 Internationalization API
(Intl) built into your own browser: Intl.NumberFormat,
Intl.DateTimeFormat, Intl.RelativeTimeFormat,
Intl.ListFormat and Intl.PluralRules. Nothing here is a
re-implementation of CLDR data, so the output is exactly what the same code produces in
your app on this browser. Other engines (older Safari, a different Node/ICU build) can
differ in small details such as which space character separates a number from its unit.
A locale tag that is well-formed but unsupported does not error โ the runtime falls back
to the closest available locale, and that fallback is shown in the Locale column. A tag
that is not structurally valid BCP-47 (for example en_US with an underscore)
throws a RangeError, and that row says so.
How it works
Type the BCP-47 locale tags you care about, pick a formatter, and enter one value: the page
builds a real Intl formatter per locale and prints the result side by side, live
as you type. It covers numbers (including compact, scientific and engineering notation),
currencies with an ISO 4217 code and any of the four currencyDisplay modes,
percentages, sanctioned units, dates and times via dateStyle/timeStyle,
relative time such as โ3 days agoโ or โyesterdayโ, list joining, and the plural category
(one, few, otherโฆ) a number selects in each language.
The JavaScript panel shows the exact constructor call and options object, ready to paste.
This is the ECMA-402 API that ships with your browser, running entirely on your device โ no upload, no API key, no signup. Dates use your system time zone, and the resolved locale column tells you when a tag you asked for fell back to another one, which is usually the surprise behind โit looks right on my machineโ. Each row copies on its own, and the whole table copies or downloads as plain text.
Frequently asked questions
How do I format a number for a different locale in JavaScript?
Use the built-in Intl API: new Intl.NumberFormat('de-DE').format(1234567.891) gives 1.234.567,891, while the same call with 'en-US' gives 1,234,567.891. Type your locale tags and your value into this page and it builds a real formatter per locale, shows every result side by side, and prints the exact constructor call with its options object so you can paste it straight into your code.
Which Intl formatters does this previewer cover?
All the everyday ECMA-402 ones: Intl.NumberFormat for plain numbers, currencies with an ISO 4217 code, percentages and sanctioned units including compact, scientific and engineering notation; Intl.DateTimeFormat with dateStyle and timeStyle; Intl.RelativeTimeFormat for phrases like 3 days ago or yesterday; Intl.ListFormat for joining items; and Intl.PluralRules for the plural category a number selects.
What does Intl.PluralRules select() return, and why does it matter?
It returns the plural category a number falls into for that language: in English 1 is one and 2 is other, but Polish, Arabic and Russian add few, many and zero. Picking the message string from that category instead of an if number is 1 check is the only way plurals read correctly in every locale, and this page shows the category each of your locales returns for the number you type.