{"uid":"cap_nyGF1MVzyUEFcG4bTfF70","slug":"web3-tools-unit-converter-15155552","name":"Web3 Tools Unit Converter","description":"Exact unit conversion for crypto amounts: wei, gwei, ether, lamports, SOL, satoshis, BTC or a token with N decimals.","url":"https://web3-tools.x402tookit.com/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"},"queryParams":{"type":"object","required":["amount","unit"],"properties":{"unit":{"type":"string","description":"wei, kwei, mwei, gwei, szabo, finney, ether, lamport, sol, satoshi, btc or token"},"amount":{"type":"string","description":"Plain decimal amount, for example 1.5 or 21000"},"decimals":{"type":"integer","description":"Token decimals 0 to 36, required when unit is token (USDC is 6)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"input":{"type":["null","object"],"properties":{"unit":{"type":["null","string"]},"amount":{"type":["null","string"]},"decimals":{"type":["null","number"]}}},"rawHex":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"abiUint256":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"conversions":{"type":["null","object"],"properties":{"wei":{"type":["null","string"]},"gwei":{"type":["null","string"]},"kwei":{"type":["null","string"]},"mwei":{"type":["null","string"]},"ether":{"type":["null","string"]},"szabo":{"type":["null","string"]},"finney":{"type":["null","string"]}}},"exceedsUint256":{"type":["boolean","null"]},"rawSmallestUnit":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GzuYBw509VBQT_d8JSBj6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts crypto amounts between units: wei, gwei, ether (EVM), lamports, SOL, satoshis, BTC, or custom token decimals","exampleAgentPrompt":"How many wei is 1.5 ether? Give me all the unit conversions including the raw hex and ABI uint256 value.","exampleUseCases":[{"title":"EVM smart contract gas calculation","prompt":"I'm building a transaction and need to know how much 21000 gwei is in wei and ether so I can set the right gas price in my smart contract call."},{"title":"USDC token amount normalization","prompt":"Convert 250.50 USDC to its raw token units — USDC has 6 decimals — and give me the ABI uint256 value I can use in a contract call."},{"title":"Bitcoin satoshi conversion","prompt":"How many satoshis is 0.00347 BTC? I need the exact integer amount to construct a Bitcoin transaction."}],"resultDescription":"Returns a conversions map with the amount expressed in all relevant units (wei, kwei, mwei, gwei, szabo, finney, ether for EVM; lamports/SOL for Solana; satoshis/BTC for Bitcoin), plus rawHex (hex string), abiUint256 (padded 32-byte hex for Solidity), rawSmallestUnit (integer string), a human-readable summary, and flags like exceedsUint256 and degraded.","failureModes":["Missing required 'amount' or 'unit' query param returns validation error","Invalid unit string not in allowed enum returns error","Unit 'token' without 'decimals' parameter causes failure","Amount too large to fit in uint256 sets exceedsUint256 flag","Non-numeric or malformed amount string causes parsing error","Decimals outside 0-36 range rejected"],"whenToPreferThis":"Use this endpoint when you need exact, lossless unit conversion for crypto amounts across EVM (wei/gwei/ether), Solana (lamports/SOL), or Bitcoin (satoshis/BTC) denominations, or for arbitrary ERC-20/SPL tokens with custom decimal places. It is ideal when you need the ABI uint256 hex encoding for Solidity contract calls or raw hex representations. Prefer this over manual calculation to avoid floating-point precision errors common in crypto unit math.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:14.517Z","isFirstParty":false,"canonicalSlug":"web3-tools-unit-converter-15155552"}