File size: 4,102 Bytes
b6adec1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | ---
license: other
license_name: cc0-and-unicode-license-v3
license_link: https://github.com/mkchd25/aptdot-datasets/blob/main/NOTICE
pretty_name: "ISO 3166-1 Country Codes and ISO 4217 Currencies"
language:
- en
size_categories:
- n<1K
tags:
- iso-3166
- iso-4217
- country-codes
- currency-codes
- reference-data
- payments
- json
configs:
- config_name: countries
data_files: records-countries.jsonl
default: true
- config_name: currencies
data_files: records-currencies.jsonl
- config_name: withdrawn_since_2020
data_files: records-withdrawn_since_2020.jsonl
---
# ISO 3166-1 Country Codes and ISO 4217 Currencies
All 249 ISO 3166-1 countries and territories and 178 current ISO 4217 currencies, with minor units, symbols, cash rounding, the decimals used by Stripe, Adyen, PayPal and JavaScript Intl, and currency changes since 2020.
Country and currency pickers, payment amount formatting and validation of country or currency codes.
**Full guide and live preview: [www.aptdot.com/datasets/country-currency-codes-reference/](https://www.aptdot.com/datasets/country-currency-codes-reference/)**
| | |
| :--- | :--- |
| Version | 1.0.0 (2026-10-22) |
| License | CC0 1.0 + Unicode License v3 (see below) |
| JSON Schema | [`country-currency-codes-reference.schema.json`](https://www.aptdot.com/data/v1/country-currency-codes-reference.schema.json) (Draft 2020-12) |
| Source repository | [github.com/mkchd25/aptdot-datasets](https://github.com/mkchd25/aptdot-datasets) |
| Publisher | [Aptdot](https://www.aptdot.com) |
## Files
| File | What it is |
| :--- | :--- |
| `country-currency-codes-reference.json` | The complete dataset, identical to the file on aptdot.com and GitHub |
| `country-currency-codes-reference.schema.json` | Its JSON Schema (Draft 2020-12) |
| `NOTICE.txt` | Unicode License v3 notice for the CLDR fields (keep it with any copy) |
| `records-*.jsonl` | The main lists, one record per line, for the viewer and the `datasets` library |
## Tables
| Table | Rows | File | Fields |
| :--- | ---: | :--- | :--- |
| `countries` | 249 | `records-countries.jsonl` | `alpha_2`, `alpha_3`, `numeric`, `name`, `name_short`, `flag`, `region`, `subregion`, ... |
| `currencies` | 178 | `records-currencies.jsonl` | `code`, `numeric`, `name`, `type`, `minor_units`, `symbol`, `narrow_symbol`, `cldr_digits`, ... |
| `withdrawn_since_2020` | 7 | `records-withdrawn_since_2020.jsonl` | `code`, `numeric`, `name`, `country`, `withdrawn`, `replaced_by` |
## Load it
```python
from datasets import load_dataset
rows = load_dataset("aptdot/country-currency-codes-reference", "countries", split="train")
```
Or use the complete JSON file as it is:
```python
import json
from huggingface_hub import hf_hub_download
path = hf_hub_download("aptdot/country-currency-codes-reference", "country-currency-codes-reference.json", repo_type="dataset")
data = json.load(open(path, encoding="utf-8"))
```
## Check your own data against the schema
Paste your records and `country-currency-codes-reference.schema.json` into the free [JSON Schema Validator](https://www.aptdot.com/tools/json-schema-validator/). It runs in your
browser, uploads nothing and explains every problem in plain English with its line number.
## Notes
- The `records-*.jsonl` files are generated from `country-currency-codes-reference.json`. If they ever disagree, `country-currency-codes-reference.json` is the reference.
- Versions match aptdot.com and GitHub. Changes are listed in the repository's [CHANGELOG](https://github.com/mkchd25/aptdot-datasets/blob/main/CHANGELOG.md).
## License
**This dataset is not entirely CC0.** Aptdot's selection, arrangement and notes are CC0 1.0. Country and currency names,
symbols, regions and cash rounding come from the Unicode Common Locale Data Repository (CLDR 48.2) and are distributed
under the **Unicode License v3**: keep the notice in `NOTICE.txt` with any copy of those fields. ISO 3166-1 and ISO 4217
codes are used under ISO's free-of-charge permission for the codes themselves. The file's `metadata.sources` lists which
fields come from which source.
|