Converts grams to ounces with precise decimal output using the standard conversion factor (1 ounce = 28.3495 grams). Access via MCP in Cursor or Windsurf for instant weight calculations, or call GET /v1/convert/weight/g-to-oz?grams=100 to get 3.5274 oz. Perfect for recipe scaling, shipping calculations, and scientific measurements requiring accurate conversions.
curl "https://tinyfn.io/v1/convert/weight/g-to-oz" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/convert/weight/g-to-oz', {
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/g-to-oz',
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"
}
}
}
}
Uses the precise conversion factor of 1 ounce = 28.34952312 grams, returning results to 4 decimal places for scientific accuracy.
Each MCP call handles one conversion, but AI agents like Claude can quickly process multiple values by making sequential calls within the same conversation.
This tool converts to avoirdupois ounces (standard weight), not troy ounces used for precious metals. Troy ounces are heavier at 31.1035 grams each.
Yes, accepts decimal gram values like 15.7g or 0.25g and returns proportionally accurate ounce conversions.
Zero grams returns 0 ounces. Negative values may return an error or negative ounce result depending on implementation requirements.
Get your free API key and start using Grams To Ounces in seconds.
Get Free API Key