• Your shopping cart is empty!
FREE

IP2Location™ ISO 3166-2 Subdivision Code

IP2Location™ ISO 3166-2 Subdivision Code is a free data offered for your download. This data contains the ISO3166-2 code for the states/regions used in our geolocation database. You can easily retrieve the ISO3166-2 code by mapping the country code and subdivision name.

IP2Location™ geolocation database or service is compliant with ISO 3166-2 for all countries except for the countries listed below,

  • 49 countries that don't have the official ISO3166-2 subdivisions defined.
  • 1 exception for Bahamas - New Providence region, which has no ISO3166-2 code assigned.
  • 1 exception for Greenland - Qaasuitsup Kommunia, which split into 2 new regions in Jan 2018.
  • 1 exception for Singapore - we categorize Singapore as a single subdivision.

  • Anguilla
  • Antarctica
  • American Samoa
  • Aruba
  •  
  • Aland Islands
  • Saint Barthelemy
  • Bermuda
  • Bahamas
  •  
  • Bouvet Island
  • Cocos (Keeling) Islands
  • Cook Islands
  • Curacao
  •  
  • Christmas Island
  • Western Sahara
  • Falkland Islands (Malvinas)
  • Faroe Islands
  •  
  • French Guiana
  • Guernsey
  • Gibraltar
  • Greenland
  •  
  • Guadeloupe
  • Heard Island and Mcdonald Islands
  • South Georgia and The South Sandwich Islands
  • Guam
  •  
  • Hong Kong
  • Isle of Man
  • British Indian Ocean Territory
  • Jersey
  •  
  • Cayman Islands
  • Saint Martin (French Part)
  • Macao
  • Northern Mariana Islands
  •  
  • Martinique
  • Montserrat
  • New Caledonia
  • Norfolk Island
  •  
  • Niue
  • French Polynesia
  • Saint Pierre and Miquelon
  • Pitcairn
  •  
  • Puerto Rico
  • Reunion
  • Singapore
  • Svalbard and Jan Mayen
  •  
  • Sint Maarten (Dutch Part)
  • Turks and Caicos Islands
  • French Southern Territories
  • Tokelau
  •  
  • Holy See
  • Virgin Islands, British
  • Virgin Islands, U.S.
  • Mayotte

Download
Free download
Features
Last Update 01 October, 2019
Database Format CSV Text File (Comma Delimited)
Database Fields
Name Type Description
country_code CHAR(2) Two-character country code based on ISO 3166.
subdivision_name VARCHAR(128) Subdivision name.
code VARCHAR(10) ISO3166-2 code.

Sample Database

"country_code","subdivision_name","code"
"AD","Andorra la Vella","AD-07"
"AD","Canillo","AD-02"
"AD","Encamp","AD-03"
"AD","Escaldes-Engordany","AD-08"
"AD","La Massana","AD-04"

MySQL Statement

CREATE TABLE `ip2location_iso3166_2`(
	`country_code` CHAR(2),
	`subdivision_name` VARCHAR(128),
	`code` VARCHAR(10),
	INDEX `idx_country_code` (`country_code`),
	INDEX `idx_region_name` (`subdivision_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

LOAD DATA LOCAL
INFILE 'IP2LOCATION-ISO3166-2.CSV' INTO TABLE `ip2location_iso3166_2`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n' IGNORE 1 LINES;
License Information

This works is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).

It is free for personal or commercial use with attribution required by mentioning the use of this works as follows:
"This site or product includes IP2Location™ ISO 3166-2 Subdivision Code which available from https://www.ip2location.com."