DevTools Logo

Intl API Explorer

Intl API Explorer

Try Intl formatter options live, inspect resolvedOptions and copy the exact constructor.

Runs in your browser
Try an example

Options

number · de-DE

Formatted result

Your browser's ICU
1.234.567,89 €

resolvedOptions()

OptionValue
localede-DE
numberingSystemlatn
stylecurrency
currencyEUR
currencyDisplaysymbol
currencySignstandard
minimumIntegerDigits1
minimumFractionDigits2
maximumFractionDigits2
useGroupingauto
notationstandard
signDisplayauto
roundingIncrement1
roundingModehalfExpand
roundingPriorityauto
trailingZeroDisplayauto

Constructor

new Intl.NumberFormat("de-DE", {"style":"currency","currency":"EUR"})

Details

Intl API Explorer turns constructor options into form controls. Switch between six Intl APIs, edit a sample value, and see the formatted output, the resolvedOptions table and the exact constructor call. Invalid option combinations such as dateStyle together with year are caught and the conflicting option is named. Results come from your browser's own ICU implementation, so they match what your users see.

More examples

German euro currency

new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(1234567.89)

Shows grouping and decimal separators as used in Germany, with the euro symbol.

Compact notation

new Intl.NumberFormat("en-US", { notation: "compact" }).format(1234567)

Produces a short form such as 1.2M instead of the full number.

São Paulo time

new Intl.DateTimeFormat("en-US", { timeZone: "America/Sao_Paulo", hourCycle: "h23" })

Combines a time zone with a 24-hour clock; the resolved options confirm the browser's choice.

Examples

German euro currency

Input
locale de-DE, value 1234567.89, style currency, currency EUR
Output
1.234.567,89 €

Grouping, decimals and symbol placement all follow German conventions.

Compact notation

Input
locale en-US, value 1234567, notation compact
Output
1.2M

Compact notation is useful for dashboards and cards with limited space.

Invalid combination

Input
dateStyle long together with year numeric
Output
Invalid option: dateStyle

The tool names the conflicting option instead of showing only a RangeError.

About this tool

Intl API Explorer is a live console for the JavaScript internationalization APIs: NumberFormat, DateTimeFormat, ListFormat, RelativeTimeFormat, PluralRules and Collator. Each API has its own option controls, a sample-value field, a formatted result, the resolvedOptions table and a constructor you can copy into your code.

Options are driven by a schema of real constructor keys, so the controls reflect the API surface rather than a simplified subset. When a combination is invalid, the tool reconstructs the formatter with one option removed at a time to name the conflicting key instead of showing a bare RangeError.

No polyfill is loaded. The output and resolved options come from this browser's ICU data, which is exactly what your users will see. A datalist of runtime-supported locales is supplemented with a small pinned favorite list, and a free-text field accepts any locale tag.

What this tool does not do

  • The explorer uses this browser's ICU data and cannot emulate another browser's output.
  • Only the six core Intl APIs are available; Segmenter, DisplayNames and DurationFormat are not included.
  • Time zone and unit lists are fixed schema values rather than the complete supportedValuesOf catalogue.
  • The generated constructor is inert text; the tool never evaluates user-authored code.
  • Configuration is not persisted across reloads.

How to use this tool

  1. Pick an API

    Choose Number, Date & time, List, Relative time, Plural rules or Collator from the tab rail.

  2. Set locale and sample

    Type or choose a locale tag and provide the sample value the formatter will process.

  3. Tune options

    Change style, notation, time zone, sensitivity or other controls; the result updates live.

  4. Copy the constructor

    Read resolvedOptions for the browser's actual choices, then copy the generated Intl constructor.

Use cases

Defining format standards

Find the option set that produces the company-standard date and currency presentation.

Debugging 12h vs 24h

Compare hour12 and hourCycle behaviour with resolvedOptions as evidence.

Documentation writing

Produce verified constructor examples with real output from a browser.

Learning ICU behaviour

See how the same value formats across en-US, de-DE, ar-EG and ja-JP.

Supported formatter APIs

APITypical use
NumberFormatCurrency, percent, compact notation and unit formatting
DateTimeFormatLocale date styles, time zones and hour cycles
ListFormatConjunction, disjunction and unit lists
RelativeTimeFormatPhrases such as 3 days ago
PluralRulesPlural category selection for cardinals and ordinals
CollatorLocale-aware string comparison

Results are produced by the browser's Intl implementation; ICU versions can differ between browsers.

Common mistakes

Mistake:Setting dateStyle and individual date components together.

Fix:Use styles or components, not both; the tool flags the conflicting key.

Mistake:Assuming formatting is identical in every browser.

Fix:Check resolvedOptions and test in the browsers you support; ICU data differs.

Mistake:Passing a date string that cannot be parsed.

Fix:Use an ISO 8601 timestamp for the date sample so new Date() succeeds.

Mistake:Expecting currency codes rather than symbols by default.

Fix:Set currencyDisplay to code or narrowSymbol.

Mistake:Confusing Collator compare output with a boolean.

Fix:The result is a negative number, zero or a positive number, labelled with the ordering.

Frequently asked questions

Which options does NumberFormat support?

Style, currency and currency display, notation and compact display, unit and unit display, sign display, rounding mode, fraction and significant digit limits, and grouping. The Number pane exposes the common ones as controls and shows the rest in resolvedOptions.

Why is my hour format 12h vs 24h?

Locale defaults and hourCycle/hour12 interact. Setting hourCycle to h23 asks for a 24-hour clock, but dateStyle and timeStyle can override explicit component choices. Inspect resolvedOptions to see which setting the browser actually applied.

Are Intl results identical across browsers?

No. The specification allows implementation-defined locale data, and browsers ship different ICU versions. Use this tool to explore your current browser, then verify critical output in the browsers you support.

How do I format currency without a symbol?

Set currencyDisplay to code for an ISO code such as EUR, or narrowSymbol for a compact symbol. The generated constructor updates immediately so you can copy it.

What is resolvedOptions for?

Every Intl instance reports the options the engine actually selected after locale negotiation and conflict resolution. The table in the result panel is browser truth, which makes it the fastest way to debug surprising formatting.

Does this tool upload my sample data?

No. All formatting happens in your browser tab using the platform Intl APIs. No sample values or options are sent anywhere.

References & standards