Converts ounces to grams with precise multiplication by 28.34952 factor. Access via MCP in Cursor or Windsurf for weight calculations, or call GET /v1/convert/weight/oz-to-g?oz=5 directly. Returns exactly 141.7476 grams for 5 ounces. Uses standard avoirdupois ounce definition for cooking, shipping, and scientific applications.
curl "https://tinyfn.io/v1/convert/weight/oz-to-g" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/convert/weight/oz-to-g', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/convert/weight/oz-to-g',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's conversion tools:
{
"mcpServers": {
"tinyfn-conversion": {
"url": "https://tinyfn.io/mcp/conversion",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
1 ounce equals exactly 28.34952 grams using the international avoirdupois definition.
Use the MCP tool in Cursor, Windsurf, or Claude Code by calling the ounces-to-grams function with your value.
Yes, it accepts decimal inputs like 2.5 oz and returns precise gram calculations without rounding errors.
This tool uses avoirdupois ounces (28.35g), not troy ounces (31.10g) used for precious metals.
The API accepts single values per request - make multiple calls for batch conversions or use in loops.
Get your free API key and start using Ounces To Grams in seconds.
Get Free API Key