Formatting Utilities

Number To Words

Converts numeric values into their written English equivalent through the /v1/format/words endpoint. Pass any integer and get back its word representation — useful for generating readable reports, checks, or natural language processing. Works with negative numbers, zero, and large values up to JavaScript's safe integer limit.

API Endpoint

GET /v1/format/words

Code Examples

curl "https://tinyfn.io/v1/format/words" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/format/words', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/format/words',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's formatting tools:

{
  "mcpServers": {
    "tinyfn-format": {
      "url": "https://tinyfn.io/mcp/format",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I convert a number to words using the MCP tool?

Call the Number To Words tool with your numeric value. It returns the English text representation, like 42 becomes 'forty-two' and 1000 becomes 'one thousand'.

What's the largest number I can convert to words?

The tool handles values up to JavaScript's MAX_SAFE_INTEGER (9,007,199,254,740,991). Beyond this limit, precision may be lost in the conversion.

Does the number-to-words converter handle negative numbers and decimals?

Yes for negative numbers (returns 'negative forty-two'), but decimal support depends on the specific implementation. Test with your use case to confirm decimal handling.

Can I use this for generating written checks or legal documents?

Absolutely. The deterministic output ensures consistent formatting for financial applications, contracts, or any document requiring spelled-out numbers.

How does this compare to writing my own number-to-words function?

TinyFn handles edge cases, localization considerations, and maintains consistent output format. Saves development time versus building comprehensive number parsing logic from scratch.

Try Number To Words Now

Get your free API key and start using Number To Words in seconds.

Get Free API Key