Boneyard Tools

Number Formatter

Paste a raw number and shape it with thousands grouping, a fixed number of decimal places and custom separators. One click switches between US style like 1,234.56 and European style like 1.234,56, and optional prefix and suffix fields let you wrap the value with a currency symbol or a percent sign. The formatting runs live as you type and copies with a single button.

How to format a number

  1. Type or paste the raw number into the Number field.
  2. Click US 1,234.56 or EU 1.234,56 to set both separators at once, or set them by hand.
  3. Edit the Thousands and Decimal mark boxes if you want a space or another custom character.
  4. Tick the decimal places checkbox and set how many places to round to, or untick it to keep the number as typed.
  5. Add a Prefix such as $ or a Suffix such as % if you need one.
  6. Read the formatted Result and click Copy.

Examples

Two decimals with US comma grouping

1234567.891, US style, 2 decimals
1,234,567.89

European style with dot grouping

1234567.891, EU style, 2 decimals
1.234.567,89

Currency prefix on a negative amount

-2500 with prefix $ and 2 decimals
-$2,500.00

Frequently asked questions

How is the thousands grouping applied?

The integer part is split into groups of three digits counted from the right, then joined with your chosen separator. Any minus sign and prefix stay in front of the grouped digits, so 1234567 becomes 1,234,567 in US style.

How do I switch to European formatting?

Click the EU 1.234,56 button, which sets the thousands separator to a dot and the decimal mark to a comma. You can also type those characters into the two separator boxes yourself to get values like 1.234.567,89.

Can I use a space as the thousands separator?

Yes. The Thousands box accepts any short string up to three characters, so you can type a space to produce the SI style grouping like 1 234 567 that many countries prefer.

What happens if I do not set decimal places?

Untick the decimal places checkbox and the number keeps exactly the decimals you typed, so 1234567.891 stays as 1,234,567.891. Tick it and set a count to round to a fixed number of places, for example 2 for currency.

How does rounding work?

When decimal places are on, the value is rounded to that many places using standard rounding, and trailing zeros are kept. So 99.5 with 2 places becomes 99.50, and 2.005 rounded to 2 places follows the binary floating point result the browser produces.

How are negative numbers shown?

A single minus sign leads the output, placed before any prefix, and grouping applies only to the digits. So -2500 with a dollar prefix and 2 decimals reads -$2,500.00.

What about a value that rounds to zero?

A tiny negative such as -0.001 rounded to 2 places becomes 0.00 with no minus sign, because a signed zero would be misleading. The minus only appears when at least one non-zero digit survives the rounding.

Is there a limit on how large a number can be?

You can format very large values, but JavaScript numbers lose exact precision beyond about 9 quadrillion (2 to the 53rd power). Above that, some low-order digits may not be accurate, which is a limit of the number type rather than the grouping logic.

Is anything sent to a server?

No. Formatting happens entirely in your browser as you type, so your numbers never leave your device. There is also a JSON API if you want the same formatting inside a script.

Learn more

  • US vs European number formats

    Why 1,234.56 and 1.234,56 mean the same amount, how separators differ around the world, and how to avoid costly misreadings.

Related tools