How to get a currency from a country code

Turn an ISO country code into its currency code, name, and symbol with one request — or go the other way and list every country on a currency.

Back

Showing a price in the right currency, or labeling a checkout by region, usually starts with a country code. Here's the lookup.

Country → currency

curl https://countries.dev/alpha/JP

The currencies array carries the code, name, and symbol:

{ "name": "Japan", "currencies": [{ "code": "JPY", "name": "Japanese yen", "symbol": "¥" }] }

In code, take the first entry:

const country = await fetch("https://countries.dev/alpha/JP").then((r) => r.json());
const { code, symbol } = country.currencies[0]; // "JPY", "¥"

A handful of countries list more than one currency — currencies is an array for a reason, so don't treat index 0 as the only one.

Currency → countries

The reverse works too. Every country on the euro:

curl https://countries.dev/currency/EUR

Handy for "which markets share this currency" without scanning the whole dataset yourself.

Currency endpoint docs →

Written by

Dov Azencot

At

Tue Jun 23 2026