{"uid":"cap_952WTQekxJDQtSuSy1thg","slug":"unit-convert-ethereum-token-unit-converter-4b1f30b4","name":"Unit Convert – Ethereum/Token Unit Converter","description":"Convert an amount between wei, kwei, mwei, gwei, szabo, finney and ether — or between any token decimals (pass a number like 6 for USDC). Integer-exact, no precision loss. Pass amount, from, to. Pure compute, sub-cent — the unit-conversion commodity agents call constantly when building transactions. Not financial advice.","url":"https://402.com.tr/api/x402/unit-convert?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object"},"queryParams":{"type":"object","required":["amount"],"properties":{"to":{"type":"string","description":"To unit (or decimals number)"},"from":{"type":"string","description":"From unit (or decimals number)"},"amount":{"type":"string","description":"Amount"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_x0FF9ig_OZzRZWMd0gtZn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts an amount between Ethereum denominations (wei, gwei, ether, etc.) or arbitrary token decimal scales with integer-exact precision.","exampleAgentPrompt":"Convert 1500000000 wei to ether — I need the exact value with no rounding.","exampleUseCases":[{"title":"Gas fee display in ether","prompt":"I have a gas cost of 42000000000000 wei and need to show the user how much that is in ether — can you convert it exactly?"},{"title":"USDC raw amount normalization","prompt":"My contract returned a raw USDC balance of 5000000 — convert that from 6 decimals to a human-readable amount so I can display it."},{"title":"Transaction value gwei to wei","prompt":"I want to send 2.5 gwei as a tip in my transaction, but the RPC call needs it in wei — what's the exact wei value?"}],"resultDescription":"Returns the converted amount in the target unit as an integer-exact value, with no floating-point precision loss. Response includes the converted amount and likely metadata about the units used.","failureModes":["Missing required 'amount' query parameter returns an error","Unrecognized unit names for 'from' or 'to' return an error","Non-numeric amount string causes a parse error","Very large numbers may require special handling depending on response format","Payment failure (insufficient USDC balance) blocks the request at the x402 layer"],"whenToPreferThis":"Use this endpoint when you need integer-exact, lossless unit conversion between Ethereum denominations (wei through ether) or arbitrary ERC-20 token decimal scales. Prefer it over client-side arithmetic when working in sandboxed agent environments without native BigInt support, or when auditability of the conversion is important. Ideal for transaction building, DeFi workflows, and any situation where floating-point errors in ETH/token amounts are unacceptable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T06:51:17.734Z","isFirstParty":false,"canonicalSlug":"unit-convert-ethereum-token-unit-converter-4b1f30b4"}