DEV Community

Cover image for I Made My First Raycast Extension: Number Formatter
Tobias
Tobias

Posted on

I Made My First Raycast Extension: Number Formatter

Number Formatter using Swiss German formatting for 1’200’000 and 1.2 Millionen.

I often run into long numbers like 1200000 or very small ones like 0.0000012 in logs, data, and documentation. They are not difficult calculations, but they are easy to misread and annoying to reformat by hand.

That recurring friction became my first Raycast extension: Number Formatter.

What it does

Type or paste a number and the command shows four forms at once:

  • Grouped
  • Compact short
  • Compact long
  • Scientific notation

For example:

  • 1200000 → 1.2 million
  • 0.0000012 → 1.2E-6

Select a result and press Enter to copy it. You can use your system locale or choose from supported English, German, French, Italian, and Spanish locales, including separate US/UK English and Germany/Switzerland German options. Decimal detail is configurable too.

Under the hood, the extension uses JavaScript's Intl.NumberFormat. Parsing and formatting happen locally on the device; the number is not sent to a service.

The scope is intentionally small: it is not a calculator, currency converter, or history tool. It takes one number, presents a few readable forms, and makes the result easy to copy.

Building it was a useful first trip through the complete Raycast extension process, from a recurring annoyance to a reviewed Store release.

Install Number Formatter from the Raycast Store

View the source on GitHub

Top comments (0)