Number Formatter
Number formatting adds thousands separators and standardizes decimal places based on locale. In the US: 1,234,567.89. In Germany: 1.234.567,89. In France: 1 234 567,89. In India: 12,34,567.89 (South Asian grouping). Currency formatting adds the symbol: $1,234,567.89 (USD), EUR 1.234.567,89 (EUR). Compact notation abbreviates: 1.2M. Scientific notation: 1.235e+6. Use the Intl.NumberFormat API to format programmatically.
Format numbers with thousands separators, decimal places, currency symbols, and locale-specific styles. Supports US, European, Indian, and Japanese number formatting. Instantly see the same number in decimal, currency, percentage, scientific, and compact formats.
Quick Examples
Enter Number
Options
How to Use
- 1
Enter a number
Type any number (including negatives and decimals) into the input field. Or click a Quick Example to load a sample value like 1234567.89, 0.005, or -9876543.
- 2
Choose your locale
Select a locale from the dropdown: US (1,234.56), Germany (1.234,56), France (1 234,56), India (12,34,567), Japan, or China. The thousands separator and decimal character update immediately.
- 3
Set options
Choose a currency (USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY). Adjust decimal places (0-6) with the slider. Toggle the thousands separator on or off.
- 4
Copy any format
The results panel shows your number in 7 formats simultaneously: decimal, currency, percentage, scientific notation, compact (1.2M), integer, and no separator. Click the Copy button next to any format.
Frequently Asked Questions
- What is number formatting and why does it differ by locale?
- Number formatting is the visual representation of a numeric value with separators and decimal markers. Different locales use different conventions: the US uses commas as thousands separators and periods as decimal points (1,234.56), while Germany reverses this (1.234,56), and France uses thin spaces (1 234,56). India uses a different grouping (12,34,567 — groups of 2 after the first 3). Always format numbers to match your audience's locale to avoid misreadings.
- How do I format a number with commas in JavaScript?
- Use the Intl.NumberFormat API: new Intl.NumberFormat("en-US").format(1234567) → "1,234,567". For currency: new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(1234.5) → "$1,234.50". For compact notation: new Intl.NumberFormat("en", { notation: "compact" }).format(1200000) → "1.2M". This API handles all locale-specific rules automatically.
- What is compact number notation?
- Compact notation abbreviates large numbers using suffixes: 1,000 → 1K, 1,000,000 → 1M, 1,000,000,000 → 1B (in US English). This is common in dashboards, analytics, and social media follower counts. The exact abbreviations depend on locale — Japanese uses 万 (10K) and 億 (100M). Compact notation sacrifices precision for readability.
- What is the difference between currency formatting and number formatting?
- Number formatting adds separators and decimal places but no currency symbol (e.g. 1,234.56). Currency formatting also adds the currency symbol in the locale-appropriate position (e.g. $1,234.56 for USD, €1.234,56 for EUR in Germany, or 1 234,56 EUR in France). Currency formatting also rounds to the currency's standard decimal places (2 for USD, 0 for JPY).
- How many decimal places should I use for different number types?
- Convention by context: Currency — 2 decimal places (except JPY: 0, KWD: 3). Percentages — 1-2 decimal places. Statistics and scientific data — match significant figures of the measurement. Prices in displays — 2 for exact amounts, 0 for rounded estimates. Financial reports — 0-2 depending on context. Software metrics — 2-4 for rates (requests/sec, latency). Round to the precision that is actually meaningful for your use case.
- What is scientific notation and when is it used?
- Scientific notation expresses numbers as a coefficient (1 ≤ c < 10) times a power of 10: 1,234,567 → 1.235e+6. It is used in science, engineering, and math to represent very large or very small numbers concisely. In JavaScript, Number.toExponential(3) → "1.235e+6". In Intl.NumberFormat, use { notation: "scientific" }. Scientific notation makes comparisons and calculations easier when orders of magnitude differ by many powers of 10.