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

@rajware/numberstowords

v0.3.0

Published

A javascript library to convert numbers to words. Supports both international and Indian convention.

Downloads

14

Readme

numberstowords

npm version License npm downloads Bundle size

A lightweight JavaScript library to convert numbers to words. Supports both international and Indian numbering conventions with extensive customization options.

✨ Features

  • 🌍 Dual conventions: International (million, billion) and Indian (lakh, crore) numbering systems
  • 💰 Currency formatting: Convert amounts to words with customizable currency symbols
  • 🎨 Highly customizable: Control commas, "and" placement, casing, and more
  • 📦 Universal: Works in browsers (via CDN or local) or node.js (CommonJS/ESM)
  • 🪶 Lightweight: Minimal dependencies, maximum functionality

🚀 Quick Start

Installation

Node.js applications

Install from npm (recommended):

npm install @rajware/numberstowords

Then import it using:

import numberstowords from '@rajware/numberstowords';

or

const numberstowords = require('@rajware/numberstowords');

Browser applications

Load it from a CDN like this.

<script src="https://unpkg.com/@rajware/numberstowords@latest/dist/numberstowords.min.js"></script>

You can get code completion in Visual Studio Code by adding a reference comment:

/// <reference path="https://unpkg.com/@rajware/numberstowords@latest/dist/numberstowords.d.ts" />

You can also download the minified Javascript and the type definition files from the latest GitHub release.

Basic Usage


// Indian convention
numberstowords.toIndianWords(123405);
// → "one lakh twenty three thousand four hundred five"

// International convention
numberstowords.toInternationalWords(123405);
// → "one hundred twenty three thousand four hundred five"

// With formatting options
numberstowords.toIndianWords(123405, { useComma: true, useAnd: true });
// → "one lakh, twenty three thousand, four hundred and five"

💡 Common Use Cases

// Currency formatting
numberstowords.toIndianWords(1250.75, {
  integerOnly: false,
  useCurrency: true,
  majorCurrencySymbol: 'dollars',
  minorCurrencySymbol: 'cents'
});
// → "dollars one thousand two hundred fifty and seventy five cents"

// Large numbers
numberstowords.toIndianWords(260000000000, { useComma: true });
// → "twenty six thousand crore"

// Decimal precision
numberstowords.toIndianWords(26.6764, { 
  integerOnly: false, 
  decimalPlaces: 4 
});
// → "twenty six point six seven six four"

// Proper case with "only" suffix
numberstowords.toIndianWords(1500, { 
  useOnlyWord: true, 
  useCase: 'proper' 
});
// → "One Thousand Five Hundred Only"

📖 Documentation

For complete documentation including:

  • All configuration options
  • Advanced examples
  • Custom word dictionaries
  • API reference

Visit: https://rajware.github.io/numberstowords/

🐛 Issues & Support

Found a bug or have a question? Please open an issue on GitHub.