PostCode Check

by Harlo

Check whether a postal code has the right format for its country and get it back in its standard form (for example ec1y8sy → EC1Y 8SY). Covers 252 countries and territories, 182 of which use postal codes. This is a format check: valid means the code has the right shape for the country. It does not confirm that the code is assigned, exists or is deliverable.

JSON API

curl -s 'https://postcodecheck.mike-tusa.workers.dev/v1/validate?country=GB&code=ec1y8sy'
curl -s -X POST https://postcodecheck.mike-tusa.workers.dev/v1/batch -H 'content-type: application/json' \
  -d '{"country":"US","codes":["95014","9501",{"country":"NL","code":"1234ab"}]}'

Routes: GET|POST /v1/validate, GET /v1/countries, POST /v1/batch (up to 100 codes). No key needed today: about 60 requests per minute per IP. OpenAPI 3.1 spec

Plans (a batch counts one call per code): Free $0/mo · 2,000 calls/mo; BASIC $9/mo · 50,000 calls/mo; PRO $29/mo · 500,000 calls/mo. No key: free and anonymous with a per-minute limit per IP. BASIC license keys (PCCR-…) go in Authorization: Bearer <key> or X-API-Key. Get BASIC: https://buy.polar.sh/polar_cl_vxapQmele1ma7rDI0te4mqOof1nuv3slVMVEh0zKs7Y PRO license keys (PCCP-…) work the same way. Get PRO: https://buy.polar.sh/polar_cl_tgmmwAqsFpnS3lq9bDcz1nFdOnfwcKuY8x2D12T1yc5

For AI agents

PostCode Check is also a remote Model Context Protocol (MCP) server with two read-only tools: validate_postcode and list_countries. Works with AI agents and assistants that can call an MCP server or a JSON API, for example Muse, Claude, ChatGPT or Cursor (descriptive only). Most MCP clients accept this config; some use a different format (for example, VS Code uses a servers key).

{ "mcpServers": { "postcodecheck": { "type": "http", "url": "https://postcodecheck.mike-tusa.workers.dev/mcp" } } }

Machine-readable docs: llms.txt · OpenAPI 3.1 spec · MCP server card.

Data and privacy

Formats come from Google libaddressinput address metadata (Apache-2.0); country names from Unicode CLDR. Postal codes you submit are processed in memory and discarded when the response is sent. They are never written to storage, logs or analytics, and PostCode Check makes no network requests. Privacy notice.