# EVM Unit Converter (wei/gwei/ether/token decimals)

> EVM Unit Converter (wei/gwei/ether/token decimals) is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Converts between Ethereum unit denominations (wei, gwei, ether) or arbitrary token decimal scales given a value and source/target unit

## Facts

- Endpoint: GET https://api.x402node.dev/crypto/units
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-unit-converter-wei-gwei-ether-token-decimals-8a21ed5e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MKz5MwmeDqARqN8AjU28Q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability evm-unit-converter-wei-gwei-ether-token-decimals-8a21ed5e
```

Example prompt: Convert 1500000000 wei to gwei and also tell me what that is in ether — I'm trying to format gas costs for display.

## When to prefer this

Use this endpoint when you need quick, stateless EVM denomination math — especially for formatting raw on-chain values (wei) into human-readable ether/gwei, or for parsing user-entered ether amounts into wei before sending transactions. Also suitable for custom ERC-20 token decimal conversions (e.g. USDC with 6 decimals, WBTC with 8).

## Known failure modes

- Missing required parameters (value, from, or to) returns an error
- Invalid unit name (not wei/gwei/ether and not a valid decimal integer) returns a validation error
- Non-numeric value input returns a parse error
- Extremely large or precision-lossy numbers may return inaccurate results depending on server-side arithmetic

## How this service works

Convert between EVM units (wei, gwei, ether) or arbitrary token decimals. Pass value, from and to as unit names or decimal counts. For gas math, token amount formatting and price math. wei gwei ether, unit conversion, token decimals, format units, parse units Accepts payment on Base or Solana — either network works.

## Output

Returns the numeric value converted to the target unit, supporting standard EVM denominations (wei, gwei, ether) as unit names or arbitrary decimal counts for custom tokens.

## Request schema (JSON Schema)

```json
{
 "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": [
      "value"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "target unit name or decimals (default wei)"
      },
      "from": {
       "type": "string",
       "description": "source unit name or decimals (default ether)"
      },
      "value": {
       "type": "string",
       "description": "numeric value as a string (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-unit-converter-wei-gwei-ether-token-decimals-8a21ed5e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
