Converts US gallons to liters with precise arithmetic, eliminating floating-point errors in volume calculations. Use via MCP in Cursor or Windsurf, or call GET /v1/convert/volume/gal-us-to-l directly. Example: 5 US gallons = 18.927059 liters. Uses the exact conversion factor of 3.785411784 liters per US gallon.
curl "https://tinyfn.io/v1/convert/volume/gal-us-to-l" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/convert/volume/gal-us-to-l', {
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/volume/gal-us-to-l',
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 exact conversion factor 3.785411784 L/gal defined by NIST. Returns results with full precision to avoid rounding errors in calculations.
US gallon equals 3.785411784 liters, while imperial gallon equals 4.54609 liters. This tool specifically converts US gallons only.
Yes, accepts decimal inputs like 2.5 gallons. AI agents in Cline or Claude Code can use this for precise fuel consumption or recipe scaling calculations.
Handles any reasonable volume size while maintaining precision. Useful for industrial applications, tank capacity calculations, or bulk liquid measurements.
Returns numeric result in liters as JSON. No unit labels in response—just the converted value for easy integration into calculations.
Get your free API key and start using Gallons Us To Liters in seconds.
Get Free API Key