Locale String Tester

Test and preview all Intl API formatters with any locale, side by side.

About This Tool

The Locale String Tester is a free browser-based tool that lets you explore the full power of the JavaScript Internationalization API (Intl). Select any locale and instantly see how numbers, dates, currencies, relative times, lists, plural rules, collation order, and display names are formatted in that locale.

All processing happens entirely in your browser using the native Intl object built into every modern JavaScript engine. No data leaves your machine, and no third-party services are contacted. This makes it safe to test with any values including production data.

The tool covers seven core Intl formatters: Intl.NumberFormat for decimal, currency, percent, unit, and compact notation; Intl.DateTimeFormat for full, long, medium, and short date/time styles; Intl.RelativeTimeFormat for human-readable relative times like "3 days ago"; Intl.ListFormat for joining lists with locale-appropriate conjunctions and disjunctions; Intl.PluralRules for determining cardinal and ordinal plural categories; Intl.Collator for locale-aware string sorting; and Intl.DisplayNames for translating language, region, script, and currency names into any language.

The side-by-side comparison mode lets you select two locales and view results for both simultaneously, making it easy to spot formatting differences. This is invaluable when building internationalized applications. If you are working with timestamps, try the Timestamp Converter or the Timezone Converter for additional date/time utilities. For text encoding across character sets, the Unicode Inspector and Encoding Detector are useful companions.

How to Use

  1. Select a locale from the dropdown or type a custom BCP 47 locale tag (e.g. bn-BD, pt-BR) in the text input.
  2. Adjust the input values panel to set the number, currency, unit, date, relative time, list items, and plural value you want to test.
  3. Review the formatted results grouped by Intl API: NumberFormat, DateTimeFormat, RelativeTimeFormat, ListFormat, PluralRules, DisplayNames, and Collator.
  4. Click the Copy button next to any result to copy it to your clipboard.
  5. Enable Compare mode to select a second locale and view both results side by side.
  6. Use the Clear button to reset all inputs to their default values.
  7. Experiment with RTL locales (ar-SA, he-IL) to see how number and date formatting differs for right-to-left languages.

Popular Locale Formatting Examples

View all locale formatting examples →

FAQ

Is my data safe when using this tool?

Yes. All formatting is performed client-side in your browser using the native JavaScript Intl API. No data is transmitted to any server. You can safely test with real production values.

What is the Intl API?

The Intl object is a built-in JavaScript namespace that provides language-sensitive string comparison, number formatting, date/time formatting, and more. It is supported in all modern browsers and Node.js without any additional libraries.

Which locales are supported?

The tool supports any valid BCP 47 locale tag that your browser's Intl implementation supports. Common examples include en-US, ja-JP, de-DE, fr-FR, zh-CN, ar-SA, and hundreds more. You can type any custom locale tag in the input field.

Why do some formatters show errors for certain locales?

Not all locale/option combinations are supported by every browser engine. For example, some older browsers may not support Intl.DisplayNames for certain types. The tool catches these errors and displays them inline so you can see exactly which combinations work.

What is the difference between cardinal and ordinal plural rules?

Cardinal plurals determine the form used for counting (1 cat, 2 cats). Ordinal plurals determine the form used for ordering (1st, 2nd, 3rd). Different languages have different numbers of plural categories -- English has 'one' and 'other' for cardinal, while Arabic has six categories.

Can I use this for RTL (right-to-left) languages?

Yes. The tool renders formatted output with dir='auto' so browsers correctly display RTL text for Arabic, Hebrew, and other RTL locales. The comparison mode is particularly useful for seeing how the same values appear in LTR vs RTL locales.

How does the side-by-side comparison work?

Click the Compare button to enable comparison mode. Select a second locale from the dropdown. Both locales' formatted results are displayed in a two-column layout so you can directly compare how the same input values are formatted differently.

Related Tools