Toolbox-XToolbox-X

Number to Words (Cardinal)

Converts a numeric value into its English word representation.

numberToWords

The numberToWords function converts a numeric value (integer or numeric string) into its English word representation. It supports values up to 10e19 or 10^20 (one hundred quintillion).

Warning

  • Supports only values up to 10e19 (10^20) (one hundred quintillion).
  • Decimal values are ignored; only the integer part is processed.

Function Signature

function numberToWords(number: Numeric): string

Parameters

  • number (Numeric): The numeric value (integer or numeric string) to convert.

Return Value

  • string: The English word representation of the integer portion of the input.

Example Usage

playground.ts

Notes

  • The function uses predefined constants for ones, teens, tens, and large denominations to construct the word form.
  • Negative numbers are correctly prefixed with "minus".

Aliases

The following aliases can be used for the numberToWords function:

  • convertNumberToWords

See Also

Last updated: Mon, Jun 15, 2026 11:04:47AM (UTC)

On this page