MockHero

country_code

Location

Generate ISO 3166-1 alpha-2 country codes (DE, US, JP, etc.). Compact country identifiers for databases and API responses.

Example Outputs

DEUSJPBRSE

API Usage

Send a POST request to generate country code data:

curl -X POST https://mockhero.dev/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tables": [
    {
      "name": "example",
      "count": 5,
      "fields": [
        {
          "name": "country_code",
          "type": "country_code"
        }
      ]
    }
  ]
}'

Common Use Cases

  • Database country fields
  • API response mocking
  • Internationalization testing
  • Currency mapping

Quick Info

Field Type
country_code
Category
Location
Parameters
None required
Output Format
JSON, CSV, SQL

Try it now

Generate country code data instantly in the playground.

Generate Country Code + 155 more types via API

One API call. Multiple tables. Relational integrity. Free tier included.

Get Started Free