Number Formatter
Format numbers as decimals, currencies, percentages, or scientific notation with locale support.
POST
1 credit
/v1/number-format
curl -X POST "https://devtools.toolkitapi.io/v1/number-format" \
-H "Content-Type: application/json" \
-d '{
"number": 1234567.89,
"locale": "de_DE",
"format_type": "currency",
"currency": "EUR"
}'
import httpx
resp = httpx.post(
"https://devtools.toolkitapi.io/v1/number-format",
json={
"number": 1234567.89,
"locale": "de_DE",
"format_type": "currency",
"currency": "EUR"
},
)
print(resp.json())
const resp = await fetch("https://devtools.toolkitapi.io/v1/number-format", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"number": 1234567.89,
"locale": "de_DE",
"format_type": "currency",
"currency": "EUR"
}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response
200 OK
{
"formatted": "1.234.567,89\u00a0€",
"original": 1234567.89,
"locale": "de_DE",
"format_type": "currency"
}
Try It Live
Live Demo
Response
Description
Format numbers as decimals, currencies, percentages, or scientific notation with locale support.
How to Use
1
1. Pass the `number` to format. 2. Set `format_type` to `decimal`, `currency`, `percent`, or `scientific`. 3. Optionally set `locale` (default: `en_US`) and `currency` code.
About This Tool
Number Formatter converts numeric values into locale-aware formatted strings. Supports decimal, currency, percentage, and scientific notation formats across hundreds of locales.
Powered by the Babel internationalization library for accurate locale-specific formatting rules — thousands separators, decimal marks, currency symbols, and positioning.
Why Use This Tool
- Internationalized displays — Format prices for different regions
- Report generation — Consistent number formatting across documents
- Currency conversion display — Format amounts with correct symbols and positioning
- Scientific data — Express large/small numbers in scientific notation
Frequently Asked Questions
What locales are supported?
All locales supported by the CLDR/Babel library — hundreds including `en_US`, `de_DE`, `ja_JP`, `fr_FR`, `zh_CN`, `ar_SA`, `pt_BR`, etc.
How does percent formatting work?
The number is treated as a ratio: `0.85` → `85%`. Pass `85` if you want `8,500%`.
Start using Number Formatter now
Get your free API key and make your first request in under a minute.