Docs / Money and business

Indian number formatting API

Lakh and crore grouping, 1.2 Cr short forms, rupees and Indian-script digits.

One number written every way it is written in India: 12,34,567 grouping, the international form, rupees with paise, short forms (12.3 L, 1.25 Cr), in words, and with the digits of nine Indian scripts.

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

Format a number the Indian way

GET/v1/format/number/{number}

ParameterDescription
numberpath, requiredThe number: digits, a point, optional commas or a minus sign. Indian-script digits are read too.
decimalsqueryRound to this many decimals, 0 to 10.

curl

curl "https://api.dharun.dev/v1/format/number/123456789.5?utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/format/number/123456789.5?utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/format/number/123456789.5?utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response

{
  "data": {
    "input": "123456789.5",
    "value": 123456789.5,
    "indian": "12,34,56,789.5",
    "international": "123,456,789.5",
    "rupees": "₹12,34,56,789.50",
    "short": {
      "short": "12.35 Cr",
      "long": "12.35 crore",
      "unit": "crore"
    },
    "words": "twelve crore thirty-four lakh fifty-six thousand seven hundred eighty-nine point five",
    "scripts": {
      "beng": "১২,৩৪,৫৬,৭৮৯.৫",
      "deva": "१२,३४,५६,७८९.५",
      "gujr": "૧૨,૩૪,૫૬,૭૮૯.૫",
      "guru": "੧੨,੩੪,੫੬,੭੮੯.੫",
      "knda": "೧೨,೩೪,೫೬,೭೮೯.೫",
      "mlym": "൧൨,൩൪,൫൬,൭൮൯.൫",
      "orya": "୧୨,୩୪,୫୬,୭୮୯.୫",
      "taml": "௧௨,௩௪,௫௬,௭௮௯.௫",
      "telu": "౧౨,౩౪,౫౬,౭౮౯.౫"
    }
  },
  "meta": {
    "note": "Indian grouping puts commas after the thousands, then every two digits (lakh, crore). For words in Hindi or Tamil, see /v1/words."
  }
}

Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.