aptdot-dev's picture
Upload 7 files
b6adec1 verified
|
Raw History Blame Contribute Delete
4.1 kB
metadata
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/

Version 1.0.0 (2026-10-22)
License CC0 1.0 + Unicode License v3 (see below)
JSON Schema country-currency-codes-reference.schema.json (Draft 2020-12)
Source repository github.com/mkchd25/aptdot-datasets
Publisher Aptdot

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

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:

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. 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.

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.