Converts decimal numbers to properly formatted percentages with customizable precision. Use via MCP in Cursor or Windsurf, or call GET /v1/format/percentage directly. Input 0.1234 returns "12.34%" — handles edge cases like negatives and zero reliably. Essential for financial dashboards and data visualization where consistent percentage display matters.
curl "https://tinyfn.io/v1/format/percentage" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/format/percentage', {
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/percentage',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
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"
}
}
}
}
Pass the decimal value and specify precision parameter. For example, 0.1234 with 2 decimal places returns "12.34%".
Yes, negative decimals format properly as negative percentages. -0.05 becomes "-5.00%" maintaining the sign.
Absolutely. AI agents in Cursor or Cline can format rate data, conversion metrics, or financial ratios consistently across datasets.
Zero formats as "0.00%" and very small decimals round according to specified precision without throwing errors.
Yes, it handles the multiplication by 100 and adds the % symbol automatically, plus provides consistent formatting across different locales.
Get your free API key and start using Format Percentage in seconds.
Get Free API Key