# agent402.tools Phone Number Formatter

> agent402.tools Phone Number Formatter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-17).

Parses and formats phone numbers into E.164 and national formats for US, UK, DE, FR, AU, and IN using pure regex.

## Facts

- Endpoint: POST https://agent402.tools/api/phone-format?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-phone-number-formatter-da5e0495
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_417moQMvxTS2j8n4oV3t3

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 agent402-tools-phone-number-formatter-da5e0495 -d '<json body>'
```

Example prompt: Can you format the phone number '(415) 867-5309' into both E.164 and national format? It's a US number.

## When to prefer this

Use this endpoint when you need lightweight, fast phone number normalization to E.164 or national format for one of the six supported countries (US, UK, DE, FR, AU, IN) and do not want to depend on libphonenumber. Ideal for simple formatting pipelines where regex-based accuracy is sufficient.

## Known failure modes

- Unrecognized phone number format returns an error or null result
- Unsupported country code falls back to US default or returns an error
- Ambiguous number without country hint may be parsed incorrectly
- Malformed input string (e.g. letters mixed in) may fail to parse

## How this service works

Parse and format phone numbers into E.164 and national formats. Supports US (+1), UK (+44), DE (+49), FR (+33), AU (+61), IN (+91). Pure regex — no libphonenumber dependency.

## Output

Returns the phone number in E.164 format (e.g. +14158675309) and national format (e.g. (415) 867-5309), parsed using regex-based rules for the specified country.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "phone": {
   "type": "string",
   "description": "phone number (any common format)"
  },
  "country": {
   "type": "string",
   "description": "ISO country code hint: US, UK, DE, FR, AU, IN (default US)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "e164": "+15552345678",
  "valid": true,
  "digits": "15552345678",
  "country": "US",
  "national": "(555) 234-5678",
  "original": "+1 (555) 234-5678"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-phone-number-formatter-da5e0495/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
