Digits to Number Words Converter

Scans text for standalone digit numbers in the 0-999 range and replaces each with its spelled-out English word form, such as '23' becoming 'twenty-three', leaving non-numeric text and numbers outside that range untouched. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-23

Overview

Introduction

Spelling out numbers as words, like '23' becoming 'twenty-three', is a common formatting step for formal writing, checks, and legal text.

This tool runs entirely client-side, so nothing you paste is ever uploaded to a server.

What Is Digits to Number Words Converter?

A converter that finds standalone digit numbers in the 0-999 range and replaces each with its spelled-out English word form.

It's part of this site's String Tools collection and works entirely in your browser, converting text instantly as you type.

How Digits to Number Words Converter Works

The tool matches standalone digit sequences using a word-boundary regular expression, then converts each matched number to a word using a recursive helper covering ones, teens, tens, and hundreds.

Numbers under 20 use a direct word lookup, numbers under 100 combine a tens word with an ones word via a hyphen, and numbers 100-999 combine a hundreds word with the recursively-converted remainder.

When To Use Digits to Number Words Converter

Use it to format numeric amounts as words for formal documents, checks, or legal-style text.

It's also useful for generating written number examples for education or documentation.

Features

Advantages

  • Handles the full 0-999 range including hundreds, not just simple two-digit numbers.
  • Leaves non-numeric text and out-of-range numbers untouched rather than guessing.
  • Matches on word boundaries, so digits embedded in identifiers or product codes are left alone rather than being partly spelled out.

Limitations

  • Numbers above 999 are left as digits, since word-forming logic isn't defined beyond that range.
  • Only produces standard English number words; no support for ordinals (like 'twenty-third') or other languages.

Examples

Spelling out a number

Input

I have 23 apples and 105 oranges.

Output

I have twenty-three apples and one hundred five oranges.

Both standalone numbers are converted to their spelled-out English word forms.

Best Practices & Notes

Best Practices

  • Use this on final drafts where numbers should read as words, such as formal or legal documents.
  • Convert on a final draft rather than mid-edit, since spelled-out numbers are considerably harder to search for and re-edit than digits.
  • Review any number above 999 afterwards; those are deliberately left as digits, so a document can end up mixing both forms.

Developer Notes

Matching uses `input.replace(/\b\d+\b/g, (match) => ...)`, and `numberToWords()` recurses for the 100-999 case: `${ONES_WORDS[hundreds]} hundred` plus the recursively-converted remainder when non-zero, using hyphenated `${TENS_WORDS[tens]}-${ONES_WORDS[ones]}` for the 20-99 case.

Digits to Number Words Converter Use Cases

  • Formatting a numeric amount as words for a formal document or check
  • Generating written number examples for education
  • Converting digit-based test data into spelled-out word form

Common Mistakes

  • Expecting numbers above 999 to be spelled out; those are left as digits.
  • Using it for ordinal numbers ('1st', '2nd'); it only converts cardinal number words.

Tips

  • Use the companion Number Words to Digits Converter to go the opposite direction, from spelled-out words back to digits.
  • Years, prices, and version numbers usually read better as digits, so scan the result rather than accepting every substitution unchecked.

References

Frequently Asked Questions