Number to Words Conversion — When, Why, and How to Implement It

Number to words conversion translates numeric values into their full written English equivalents — 1234 becomes "one thousand two hundred thirty-four" and 5250.00 becomes "five thousand two hundred fifty dollars." This is a standard requirement in financial documents, legal contracts, invoice generation, accessibility features, and internationalisation work. Despite its apparent simplicity, edge cases like hundreds vs thousands, the word "and," currency formatting, and very large numbers make this a surprisingly nuanced problem to implement correctly.

Convert any number to words instantly with our free Number to Words Converter tool. For other text and data formatting tools, see our Text Size Calculator and Character Counter.

Where Number to Words Conversion Is Required

Financial Documents

Cheques, bank drafts, and money orders require amounts written in words as a fraud prevention measure. The written form is harder to alter than digits — changing "five thousand" is more obviously suspicious than changing "5,000" to "9,000." Legal financial documents like deeds and settlement agreements also routinely write numerical amounts in words, often with the numeral in parentheses after: "five thousand two hundred and fifty dollars ($5,250.00)."

Invoice Generation

Many accounting and invoicing systems automatically generate the written word form of invoice totals for formal documentation. In some jurisdictions and industries this is legally required. Invoice software built on platforms that handle billing needs this conversion as a standard feature.

Legal Documents

Contracts, property deeds, and legal agreements write numbers in words to eliminate ambiguity. Photocopied or scanned documents can have digits altered more easily than written words. Courts and legal professionals often require number words alongside numerals for clarity and tamper-evidence purposes.

Accessibility

Screen readers handle written numbers differently from numerals. The number 1,000,000 might be read aloud as "one comma zero zero zero comma zero zero zero" by some screen readers, while the words "one million" are unambiguous. Content targeting users with visual impairments benefits from either written number words or structured markup that helps screen readers interpret numbers correctly. Our Text to Speech tool can help you test how text reads aloud.

Internationalisation

Different languages and regions write numbers differently. Not just the words themselves, but the grouping conventions (comma vs period as thousands separator), the position of currency symbols, and the spoken-word equivalents all vary by locale. Applications serving international audiences need locale-aware number formatting.

The Edge Cases That Trip Developers Up

Writing a number-to-words converter from scratch is deceptively difficult due to the edge cases:

The word "and": British English conventionally includes "and" before the final component — "one hundred and twenty-three." American English often omits it — "one hundred twenty-three." Your implementation needs to match the convention expected by your audience.

Hundreds vs thousands: 1100 could be "one thousand one hundred" or "eleven hundred." Both are correct; context and preference determine which to use. Financial documents typically prefer the full thousands form.

Zero: "zero" as a standalone, but "oh" in phone numbers, "O" in some British contexts, and typically omitted in many positions within larger numbers. The word form of 1001 is "one thousand and one" not "one thousand zero one."

Negative numbers: require "negative" or "minus" prefix depending on context. Decimals: typically read digit by digit after the decimal point — 3.14 becomes "three point one four" for general use, or "three and fourteen hundredths" in formal contexts. Very large numbers: require knowing whether to use short scale (billion = 10 to the 9th power, the US/UK standard) or long scale (milliard = 10 to the 9th power, used in much of continental Europe).

Convert any number to words — perfect for invoices, legal documents, and cheques

Try Number to Words Converter Free →

Implementing Number to Words in Code

Python — num2words Library

The most widely used Python library for this: from num2words import num2words num2words(1234) returns "one thousand, two hundred and thirty-four" num2words(1234, lang="de") returns the German equivalent num2words(42.5) returns "forty-two point five" num2words(1234.56, to="currency", lang="en_GB") returns currency word form num2words supports over 30 languages and handles ordinal numbers as well as cardinal.

JavaScript

No built-in function exists for number to words in JavaScript. The Intl.NumberFormat API provides locale-aware numeric formatting (with separators and currency symbols) but not word forms. Use a library like written-number or number-to-words from npm, or implement a custom function for your specific requirements.

PHP

PHP also lacks a built-in function. The NumberFormatter class with SPELLOUT style handles number-to-words in the available locale: $formatter = new NumberFormatter("en", NumberFormatter::SPELLOUT); echo $formatter->format(1234); // "one thousand two hundred thirty-four" This uses the system ICU library and supports multiple locales.

Currency Format Implementation

For financial documents, the typical pattern is to split the amount at the decimal point, convert both parts separately, then format: Amount 5250.75: Integer part (5250) = "five thousand two hundred fifty" Decimal part (75) = "seventy-five" Result: "five thousand two hundred fifty dollars and seventy-five cents"

Frequently Asked Questions

Cardinal numbers express quantity: one, two, three, forty-two, one million. Ordinal numbers express position in a sequence: first, second, third, forty-second, one millionth. Both forms are useful in different contexts — cardinal for amounts and measurements, ordinal for rankings, dates, and sequence positions. Most number-to-words libraries support both: num2words(3) gives "three" and num2words(3, to="ordinal") gives "third" in Python.
Yes, you can convert numbers to words in Excel by using a VBA macro, an add-in, or an online number to words converter. This is commonly used for invoices, cheques, receipts, and financial documents.
Two different naming conventions exist for large numbers. Short scale (used in the US, UK since 1974, and most English-speaking countries): million = 10 to the 6th, billion = 10 to the 9th, trillion = 10 to the 12th. Long scale (used in most of continental Europe and historically in the UK): milliard = 10 to the 9th, billion = 10 to the 12th, billiard = 10 to the 15th. A US billion is a European milliard. This difference causes real confusion in international business and financial reporting. When dealing with very large numbers in international contexts, always specify the scale explicitly.
For currency amounts, split at the decimal and write each part separately using the currency unit names. $5,250.75 becomes "five thousand two hundred fifty dollars and seventy-five cents." For general decimal numbers, the convention is to say "point" and then read each digit individually: 3.14 becomes "three point one four." The fraction form ("three and fourteen hundredths") is correct but less common in everyday usage, though it appears in formal legal documents.
Legal conventions vary by jurisdiction and document type, but common patterns include: writing both the numeral and the word form together — "five thousand two hundred and fifty dollars ($5,250.00)"; using the word form first for amounts; and avoiding ambiguous abbreviations. In practice, follow the conventions of the specific jurisdiction where the document will be enforceable, and consult a legal professional for documents with significant financial or legal consequences.
Scroll to Top
Checker Tools