npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

i18n-number-to-words

v1.0.1

Published

A modern TypeScript library for converting numbers to words in multiple languages with multi currency support.

Readme

Features

  • 🌍 Multi-language support: Polish (pl-PL), English (en-US), and German (de-DE)
  • 💰 Currency support: PLN (Polish Złoty), USD (US Dollar), and EUR (Euro)
  • 🔢 Number to words conversion: Convert any number to its word representation
  • 💵 Amount formatting: Convert monetary amounts with proper currency forms
  • 📦 TypeScript: Full TypeScript support with type definitions
  • 🚀 Zero dependencies
  • 🎯 Tree-shakeable: Only import what you need

Installation

npm install i18n-number-to-words

Quick Start

import { numberToWords, getAmountInWords } from 'i18n-number-to-words'

// Polish (default)
numberToWords({ number: 123 })
// Output: "sto dwadzieścia trzy"

// English
numberToWords({ number: 123, locale: 'en-US' })
// Output: "one hundred twenty three"

// German
numberToWords({ number: 123, locale: 'de-DE' })
// Output: "einhundert dreiundzwanzig"

// With currency
getAmountInWords({ amount: 43.75, locale: 'en-US', currency: 'USD' })
// Output: "forty three dollars, 75/100"

Documentation

Usage

Number to Words

import { numberToWords } from 'i18n-number-to-words'

// Polish (default)
numberToWords({ number: 123 })
// Output: "sto dwadzieścia trzy"

numberToWords({ number: 1000 })
// Output: "jeden tysiąc"

// English
numberToWords({ number: 123, locale: 'en-US' })
// Output: "one hundred twenty three"

numberToWords({ number: 1000, locale: 'en-US' })
// Output: "one thousand"

// German
numberToWords({ number: 123, locale: 'de-DE' })
// Output: "einhundert dreiundzwanzig"

numberToWords({ number: 1000, locale: 'de-DE' })
// Output: "eins tausend"

Amount in Words (with Currency)

import { getAmountInWords } from 'i18n-number-to-words'

// Polish with PLN (default)
getAmountInWords({ amount: 43.75 })
// Output: "czterdzieści trzy złote, 75/100"

getAmountInWords({ amount: 1.0 })
// Output: "jeden złoty, 00/100"

// English with USD
getAmountInWords({ amount: 43.75, locale: 'en-US', currency: 'USD' })
// Output: "forty three dollars, 75/100"

getAmountInWords({ amount: 1.0, locale: 'en-US', currency: 'USD' })
// Output: "one dollar, 00/100"

// German with EUR
getAmountInWords({ amount: 43.75, locale: 'de-DE', currency: 'EUR' })
// Output: "dreiundvierzig Euro, 75/100"

getAmountInWords({ amount: 1.0, locale: 'de-DE', currency: 'EUR' })
// Output: "eins Euro, 00/100"

API Reference

numberToWords(options)

Converts a number to its word representation.

Parameters:

  • options.number (number, required): The number to convert
  • options.locale (Locale, optional): Language locale. Default: 'pl-PL'
    • Available: 'pl-PL' | 'en-US' | 'de-DE'

Returns: string - The number in words

getAmountInWords(options)

Converts a monetary amount to words with currency.

Parameters:

  • options.amount (number, required): The monetary amount
  • options.locale (Locale, optional): Language locale. Default: 'pl-PL'
    • Available: 'pl-PL' | 'en-US' | 'de-DE'
  • options.currency (Currency, optional): Currency code. Default: 'PLN'
    • Available: 'PLN' | 'USD' | 'EUR'

Returns: string - The amount in words with currency

Supported Languages

  • 🇵🇱 Polish (pl-PL): Full support with proper plural forms
  • 🇺🇸 English (en-US): Full support with standard American English
  • 🇩🇪 German (de-DE): Full support with German number rules (reversed order for 21-99)

Supported Currencies

  • PLN (Polish Złoty): With proper Polish plural forms (złoty/złote/złotych)
  • USD (US Dollar): With English plural forms (dollar/dollars)
  • EUR (Euro): With German formatting (Euro is invariant)

License

Read license here - MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contributing Rules

  • Remember to add tests to the test.ts file. 😉
  • Describe the changes in the Pull Request so that it is clear what has been added.
  • Add TSDoc to new features/functions.