Currency codes explained: how USD, JPY and XOF are built
A currency code is the three-letter identifier defined by the ISO 4217 standard: the first two letters are normally the country's two-letter code and the third is the initial of the currency, so US plus dollar gives USD. Codes beginning with X are reserved for currencies and units that belong to no single country, including the CFA francs XOF and XAF.
5 min · Updated 30 August 2026
Why currency codes exist at all
Currency symbols are ambiguous. The dollar sign is used by the United States, Canada, Australia, Singapore, Mexico and many others. The abbreviation kr covers several Nordic currencies. On a bank statement, an invoice or a payment instruction, that ambiguity is expensive and occasionally litigious.
ISO 4217 solves it by giving every currency a unique three-letter code, along with a three-digit numeric code and the number of decimal places the currency uses. It is the standard behind the currency field in banking messages, accounting software, airline fares and every serious converter.
How the three letters are built
The rule is simple and holds most of the time: take the two-letter country code, then add the first letter of the currency's name. US plus dollar gives USD. JP plus yen gives JPY. IN plus rupee gives INR. BR plus real gives BRL. The interesting codes are the ones where that rule needs explaining.
When a country replaces or redenominates its currency it receives a new code rather than keeping the old one. That is deliberate: the retired code stays attached to the old money, so historical records do not silently change meaning.
- CHF: CH is Switzerland, from the Latin Confoederatio Helvetica, plus franc.
- GBP: GB is the United Kingdom, plus pound, the currency being pound sterling.
- MXN: MX plus peso, with N for the nuevo peso introduced when Mexico redenominated in 1993.
- EUR: the euro belongs to no single country, so it takes the letters of its own name.
- ZAR: ZA is South Africa, plus rand, the name taken from the Witwatersrand.
The parts of the standard nobody sees
Besides the letters, ISO 4217 gives each currency a three-digit numeric code, 840 for the US dollar and 978 for the euro, used where letters are awkward: card network messages, older banking formats and systems that do not assume a Latin script. For national currencies the numeric code usually matches the country's own numeric code.
The standard also fixes the minor unit, meaning how many decimal places the currency is normally written with. Most use two. This is not a display preference: payment systems use it to interpret an integer amount, so software that assumes two decimals everywhere will charge a hundred times too much or too little in a currency that uses a different number.
Why some currencies have no decimals, and some have three
The Japanese yen, the Korean won, the Vietnamese dong, the Chilean peso, the Icelandic króna and the CFA francs are all written with no decimal places. In each case the subunit was abolished or became worthless through decades of price rises. The yen's sen was withdrawn from circulation in 1953, and splitting a modern yen would describe an amount nobody transacts in.
A smaller group goes the other way. The Kuwaiti, Bahraini, Omani, Jordanian, Tunisian and Libyan dinars divide into a thousand subunits rather than a hundred, which is why prices in those countries carry three digits after the decimal point.
- Zero decimals: JPY, KRW, VND, CLP, ISK, XOF, XAF, XPF.
- Two decimals: the large majority, including USD, EUR, GBP, INR and CNY.
- Three decimals: KWD, BHD, OMR, JOD, TND, LYD.
The X codes: units that belong to no country
Codes beginning with X are reserved for things that are not one country's national money. Precious metals have them, with XAU for one troy ounce of gold and XAG for silver. The reserve asset of the International Monetary Fund, the special drawing right, is XDR. The code XXX means no currency, used for records where an amount carries no monetary unit at all.
The same letter covers currencies shared by several countries, which is where most people actually meet an X code: XOF, XAF and XPF.
XOF, XAF and XPF, and who uses them
XOF is the West African CFA franc, issued by the BCEAO for the eight members of the West African Economic and Monetary Union: Benin, Burkina Faso, Côte d'Ivoire, Guinea-Bissau, Mali, Niger, Senegal and Togo. XAF is the Central African CFA franc, issued by the BEAC for the six members of the Central African Economic and Monetary Community: Cameroon, the Central African Republic, Chad, the Republic of the Congo, Equatorial Guinea and Gabon.
The two are fixed to the euro at the same rate, 655.957 francs to one euro, so a unit of each is worth exactly the same. They are not the same currency: notes and coins from one zone are not legal tender in the other, which regularly catches out travellers crossing between them. XPF, the CFP franc used in French Polynesia, New Caledonia and Wallis and Futuna, is likewise fixed to the euro at its own rate.
All three appear among the 148 currencies in All Currency Converter, searchable by code or by name in whichever of its 20 languages you have set.
FAQ
What is ISO 4217?
ISO 4217 is the international standard that defines currency codes. It assigns each currency a unique three-letter code such as USD or JPY, a three-digit numeric code, and the number of decimal places that currency uses. Banks, accounting systems and payment networks rely on it to identify money without ambiguity.
What is the difference between XOF and XAF?
They are two separate currencies with the same name and the same value. XOF is the West African CFA franc issued by the BCEAO for eight countries, and XAF is the Central African CFA franc issued by the BEAC for six. Both are fixed to the euro at the same rate, but banknotes from one zone are not accepted in the other.
Why does the Japanese yen have no cents?
Its subunit, the sen, had lost so much value that it was withdrawn from circulation in 1953. ISO 4217 records the yen as having zero decimal places, so amounts are written as whole yen. The Korean won, the Vietnamese dong and the CFA francs are treated the same way for the same reason.
Convert anywhere, even offline
148 currencies, saved rates for offline use, a built-in calculator and historical charts.