← Unit conversions

Convert grams to ounces

Convert grams to ounces instantly. Type a value below and the result updates as you go.

Category

Unit category

Convert

Use this tool from AI agents

This tool's engine is available to AI agents over MCP as convert_units. Add the Clean.tools server, then your agent can call it directly.

Claude Code
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcp
Claude Desktop (mcpServers)
{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}
Cursor
https://mcp.clean.tools/mcp

Or call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:

curl
curl -s https://api.clean.tools/v1/convert_units \ -H 'content-type: application/json' \ -d '{"category":"length","value":10,"from":"km","to":"mile"}'
JavaScript
const res = await fetch('https://api.clean.tools/v1/convert_units', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ category: 'length', value: 10, from: 'km', to: 'mile' }) }); const data = await res.json();

Converting grams to ounces

1 gram equals 0.035274 ounces, so 10 grams is 0.35274 ounces. The converter above is preset to grams and ounces, so you can type any value and read the result instantly. Switch the category or units at any time to convert something else.

The conversion uses exact factors, and everything runs locally in your browser with no data sent to a server. No cost, no signup, no tracking.


Frequently asked questions

How many ounces are in a gram?

0.035274 ounces. 1 gram equals 0.035274 ounces, so 10 grams is 0.35274 ounces.

Can I convert other units too?

Yes. The tool above handles length, weight, temperature, volume, data, speed, area, and time. Pick a different category or swap the from and to units to convert anything in those groups.

Can I use this from the command line or an AI agent?

Yes. The same converter is a REST endpoint at https://api.clean.tools/v1/convert_units, and it is an MCP server you can add to Claude, Claude Code, or Cursor. The @clean-tools/mcp npm package runs it as a local stdio server.

More conversions

View all tools

Use Clean.tools from your AI agent

This tool is also convert_units on the Clean.tools MCP server — the same engine, callable by your AI agent directly. No key, no signup: requests are processed in memory and request contents are never stored.

Claude Code
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcp
Any MCP client (streamable HTTP, authless)
https://mcp.clean.tools/mcp

Every tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →