Skip to content

dmkishi/int2words

Repository files navigation

int2words

Convert integers into words.

Features and limitations:

  • Languages: English and Japanese.
  • Integer range: 0 → 253–1.
    • While 64-bit floating-point numbers technically support numbers up to approximately 1.8 × 10308, there is a significant loss of precision. 253–1 is the largest integer with no loss of precision.

View example.

Install

npm install int2words

For legacy browsers:

Usage

import { int2en, int2jp } from 'int2words';
console.log(int2en(321)); // "three hundred twenty-one"
console.log(int2jp(321)); // "三百二十一"

For legacy browsers:

Changelog

v2.0.0 (2025-)

Change name and modernize.

v1.2.7 (2016-5-4)

Acknowledgments

License

This project is licensed under the GNU General Public License (GPL).