Skip to content

Free GeoJSON boundaries: countries, states, counties and postcodes

You need a GeoJSON of a few countries, one state's counties or a set of postal areas, and every download page offers either the whole world at full detail or a file of unknown origin. This guide shows how to pick just the boundaries you need, export them as GeoJSON, and what you owe the data publishers when you use them.

Quick answer: free GeoJSON boundaries in three steps

The fastest way to get free GeoJSON boundaries for a specific set of areas is to pick them on a map and export them. In the TerritoryKit map builder, choose Territories → Add boundaries, pick a country (or World) and check the countries, states, counties or postal areas you want. Optionally merge some of them into larger regions. Then choose Export → Zones for GIS (GeoJSON).

Adding boundaries works without an account. The export needs a free sign-in with Google or an email code, and on the free Demo plan it uses one of your 10 exports. You get a standard GeoJSON FeatureCollection in WGS84 longitude and latitude, ready for QGIS, Mapbox, Leaflet, a database or your own code.

The Add territory boundaries dialog in TerritoryKit set to Japan, with region quick picks, prefectures expanded to municipalities, and 316 municipalities selected.
Pick World or any country in the Add territory boundaries dialog, choose the level, then tick the areas you want as GeoJSON.

Which boundaries you can export

The boundary library covers about 215 countries and territories. These are the sets most people ask for as administrative boundaries GeoJSON:

Boundary sets available for GeoJSON export
BoundaryCoverageSourceLicence
World countries242 countries and territories in 7 continentsNatural Earth 1:50mPublic domain
States and provinces, any countryFirst-level areas worldwideNatural Earth 1:10m admin-1Public domain
US states and counties56 states and territories, 3,231 countiesUS Census cartographic boundaries (us-atlas)Public domain
US 3-digit ZIP areas896 areas in 54 states and territories2020 Census ZCTAs dissolved by first 3 digitsPublic domain
US 5-digit ZIP (ZCTA), county or state lookupUp to 50 codes per lookupCensus TIGERwebPublic domain
Canada provinces, census divisions and FSAs13 provinces and territories, 293 census divisions, 1,643 FSAsStatistics Canada 2021Statistics Canada Open Licence
Australia LGAs and postcodes547 local government areas, 2,641 postcodesgeoBoundaries and ABS ASGS 2021CC BY 4.0 (postcodes)
Districts and municipalities43 countries, from Germany's 401 Kreise to Brazil's 5,570 municipalitiesgeoBoundaries gbOpen, Natural EarthVaries by country; shown in the picker

Postal sets have their own guides: 3-digit ZIP code maps, Canada postal code (FSA) maps and Australia postcode maps. Not included: UK postcode areas and districts (the open data is outdated and the current data is Royal Mail-licensed), German PLZ, Dutch PC4 areas, and US 5-digit ZIPs as a browsable set. Five-digit ZIPs come from the paste lookup instead.

Export GeoJSON step by step

  1. Open the boundary picker

    Open the map builder. In the Territories panel, choose the globe button, Add boundaries.

  2. Pick a country and boundary set

    Choose World for a world countries GeoJSON, or a country. If the country has more than one set, pick it under Boundaries, for example “States and counties” or “3-digit ZIP codes” for the United States.

  3. Choose the level

    Under Territories from, choose the first level (states, provinces, regions) or the second level (counties, districts, municipalities, postal areas).

  4. Select the areas

    Checking a state checks every area inside it. Use Search boundaries and Select all matches for name searches, or the quick-pick chips, such as US Census regions, to select whole regions. Then choose Add.

  5. Merge or split if you need custom shapes

    Select several zones and choose Merge selected zones to dissolve them into one region, or use Line cut to split an area along a drawn line. Rename zones; the name is written to the file.

  6. Sign in and export

    Choose Export → Zones for GIS (GeoJSON). On Demo, this uses one of 10 exports. Pro removes the limit.

TerritoryKit Export menu listing map image or print/PDF, zones for Google Maps (KML), zones for GIS (GeoJSON), metrics, point membership and project backup.
Export → Zones for GIS (GeoJSON) writes every territory on the map to one GeoJSON file.

The file is a FeatureCollection with one Feature per zone, as a Polygon or MultiPolygon. Each feature carries the zone name, the layer name and the color as properties. Every territory layer on the map goes into the same file, so remove layers you don't want before exporting, or filter on the layer property afterwards.

Licences and attribution: what you owe

Free doesn't always mean free of conditions. The boundaries keep their original licences after export, and the picker shows the source for each dataset at the bottom of the dialog.

  • Natural Earth (world countries, admin-1 states and provinces, several European sets): public domain. Credit is appreciated but not required.
  • US Census Bureau (states, counties, ZCTAs, 3-digit ZIP areas): works of the US government, public domain.
  • Statistics Canada: the Open Licence requires an attribution statement naming Statistics Canada as the source.
  • Australian Bureau of Statistics: CC BY 4.0, so credit the ABS.
  • geoBoundaries: each country carries its source's licence. Examples: CC BY 4.0 for Spain, Mexico and New Zealand; CC BY 3.0 IGO for Brazil; dl-de/by-2-0 for Germany; CC0 for the Netherlands; ODbL for India; CC BY-SA 2.0 for Japan. The geoBoundaries project also asks users to cite it.

GeoJSON vs TopoJSON vs KML vs shapefile

TerritoryKit stores its library as TopoJSON and exports GeoJSON and KML. Here is how the common boundary formats compare:

Boundary file formats compared
FormatWhat it isCoordinatesBest forWatch out for
GeoJSONOne JSON file of features and properties (RFC 7946)WGS84 longitude, latitudeWeb maps, JavaScript, APIs, databasesLarge for detailed shapes; coordinate order is longitude first
TopoJSONJSON that stores shared borders once as arcsUsually WGS84, often quantizedSmall files for web maps with many neighborsNeeds a library such as topojson-client to convert to GeoJSON
KML / KMZGoogle Earth XML; KMZ is a zipped KMLWGS84Google Earth, My Maps, importing into TerritoryKitStyling is mixed into the data; see KML vs KMZ
ShapefileEsri format split across .shp, .shx, .dbf and .prj filesAny; defined in the .prj fileDesktop GIS and government downloadsSeveral files to keep together; field names limited to 10 characters

Need KML instead? Choose Export → Zones for Google Maps (KML) from the same map. To convert a GeoJSON to a shapefile or GeoPackage, open it in QGIS and use Export → Save Features As, or run GDAL: ogr2ogr -f "ESRI Shapefile" zones.shp zones.geojson. Note that TerritoryKit imports boundaries as KML or KMZ, not GeoJSON, so convert GeoJSON to KML before bringing outside boundaries in.

Coordinate system: WGS84 (EPSG:4326)

GeoJSON uses the WGS84 geographic coordinate system, EPSG:4326, with each position written as longitude then latitude, in decimal degrees. TerritoryKit's export follows that rule. Most web maps display data in Web Mercator (EPSG:3857) but expect GeoJSON input in WGS84 and project it on the fly, so you rarely need to change anything. Reproject in QGIS only when you need a projected system, for example to measure areas in square kilometres or to match a national grid.

Simplification: what “planning grade” means

The built-in boundaries are simplified so a whole country loads quickly in a browser: each dataset is about 1.8 MB, and the full library about 33 MB. Coastlines lose small inlets, tiny islands may disappear, and borders are smoothed.

a point inside the detailed line may fall outside the simple one Detailed source boundary Simplified for planning Account near the border Simplified files are small and fast; check records close to a border, and use full-detail sources for legal or precise work.
Simplification trades detail for speed. Records very close to a border are the ones to check.

That's fine for sales territories, dashboards, choropleth base maps and most web maps. It isn't fine for legal descriptions, tax jurisdictions, parcel work or postal delivery. These are not survey-grade boundaries and not official postal delivery boundaries. ZIP areas, for example, are built from Census ZCTAs, which approximate USPS ZIP Codes; the ZIP code boundary files guide explains the difference.

Alternatives: download raw boundary files

Picking and exporting is quickest for a defined set of areas. Download the raw files instead when you need full detail, extra attributes such as official codes, every unit for many countries at once, or a repeatable script.

  • Natural Earth offers countries and states and provinces at 1:10m, 1:50m and 1:110m scale, mainly as shapefiles. Good for world maps; public domain.
  • geoBoundaries publishes administrative boundaries for nearly every country, by level (ADM0 for countries, ADM1, ADM2 and beyond), as GeoJSON, TopoJSON and shapefile, with the licence for each file.
  • US Census Bureau cartographic boundary files (simplified, shapefile and KML) and TIGER/Line files (full detail) cover states, counties, ZCTAs and more. See territory maps by state or county for a filtering workflow.
  • Statistics Canada and the ABS publish their boundary files in GIS formats from their websites.
  • GADM is detailed and widely used, but its licence restricts commercial use and redistribution, so check it before using GADM in a business product.

To turn a raw shapefile into GeoJSON, open it in QGIS and save it as GeoJSON, or use mapshaper, which also simplifies shapes for the web.

What to do with the boundaries next

If the boundaries are for a sales or service plan, you may not need the file at all: import your accounts into the same map and count them per territory with Analytics. The international sales territory map guide shows how to combine countries, states and districts in one plan. When you do need files, the free Demo plan's 10 exports cover a handful of GeoJSON and KML downloads; Pro (US$19 per month or US$190 per year) has unlimited exports.

FAQ

Where can I download free GeoJSON country boundaries?

Natural Earth and geoBoundaries publish free country boundaries for download. To get only the countries you need, add them from World in TerritoryKit's boundary library and choose Export → Zones for GIS (GeoJSON).

How do I get a GeoJSON of US counties for one state?

Choose Territories → Add boundaries, pick United States and “States and counties”, switch Territories from to counties, check the state and add it. Then export as GeoJSON. The counties come from Census cartographic boundaries.

Is the GeoJSON export free?

Adding boundaries is free and needs no account. Exporting needs a free sign-in, and the Demo plan includes 10 exports in total. Pro, at US$19 per month, has unlimited exports.

What coordinate system does the GeoJSON use?

WGS84 (EPSG:4326), with positions written as longitude, latitude in decimal degrees, as the GeoJSON standard (RFC 7946) requires.

Can I convert the boundaries to KML or a shapefile?

Yes. Export → Zones for Google Maps (KML) writes KML directly. For a shapefile, open the GeoJSON in QGIS and save it as a shapefile, or convert it with GDAL's ogr2ogr.

Do I need to credit the boundary sources?

Sometimes. Natural Earth and US Census data are public domain. Statistics Canada, the ABS and many geoBoundaries countries require attribution, and ODbL and CC BY-SA sets add share-alike terms.

Related guides

Build your first territory map

Bring your account list, draw the territories you need, and see the results as the map changes. Your first map is free.

Open Map Builder
Try one map free. Sign in for ten exports.