Skip to content
💫

Number Formatter

Format a number with thousands separators, decimals, currency, and percentage.

Runs in your browser

Updated

Formatted

-

Digits

0

Words

zero

Sign

-

Rounded value

-

Grouping and decimal separators differ by region, which is why a number can be misread across borders. Indian numbering is the exception that matters most: it groups the last three digits and then pairs, so 12345678 becomes 1,23,45,678 rather than 12,345,678.

Seven ways to render one number

Type a value and the page re-renders on every keystroke. The output select offers grouped number, currency, percentage, compact, spelled out, ordinal and Roman, and a second select picks the separator convention: 1,234.56, 1.234,56, space groups, or none. Decimal places clamp between 0 and 10 and open at 2, rounding is round, floor or ceil, and currency covers USD, EUR, GBP, INR, JPY, AUD, CAD and ZAR. Three checkboxes add an explicit sign, switch to lakh grouping, or ask for negatives in brackets.

A worked example

The shipped value 1234567.891 prints as 1,234,567.89. The digits card reads 10 because it counts every character except the point and the minus, and the words card spells the integer part: one million, two hundred and thirty four thousand, five hundred and sixty seven. Percentage multiplies by 100 and gives 123,456,789.10%, compact reduces it to 1.2M, and Indian grouping produces 12,34,567.89.

How the rounding is done

All three modes scale by ten to the power of the decimal count, work on that integer, then divide back. Round nudges the value by an epsilon proportional to its size before Math.round, which stops 1.005 from slipping under a binary float edge. Grouping runs after rounding and never touches the fraction.

Where it stops

  • The words style spells the integer part only and refuses anything above one trillion.
  • Roman output covers 1 to 3999 and silently drops a fractional part.
  • Ordinal groups with commas whatever separator is selected, and suffixes a decimal string unchanged.
  • Compact ignores decimal places, separators and the rounding mode.
  • The bracket box wraps negative output in parentheses; it does not affect positive values, where the separate sign box adds a plus.
  • Currency picks a symbol, not a rate, and AUD and CAD both print a bare dollar sign.

Questions people ask

Why did my commas disappear

Input is stripped of commas and spaces before being read as a number, so values pasted from reports work. Typed formatting has no effect on the result.

Does percentage divide by 100

It multiplies, treating the input as a fraction: 0.5 becomes 50.00%. For the other direction use the percentage calculator.

What happens with something that is not a number

An error line quotes the offending text and asks you to remove symbols or letters; the previous result stays until a valid value arrives. For the reverse direction there is the number to words converter and the Roman numeral converter.