Free GeoJSON sample files

Geographic features encoded as JSON: points, lines and polygons with properties. Download valid GeoJSON test files in 4 exact sizes, from 1 KB to 1 MB, each with a checksum.

Extension
.geojson
MIME type
application/geo+json
Kind
Text
Category
GIS

GeoJSON files by size

Every file below is a valid GeoJSON file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.

GeoJSON sample files by size
FileSizeContentsDownload
1 KB GeoJSON samplesample-geojson-1kb.geojson 1 KB1,024 bytes Features: 4 Download GeoJSON
10 KB GeoJSON samplesample-geojson-10kb.geojson 10 KB10,240 bytes Features: 53 Download GeoJSON
100 KB GeoJSON samplesample-geojson-100kb.geojson 100 KB102,400 bytes Features: 529 Download GeoJSON
1 MB GeoJSON samplesample-geojson-1mb.geojson 1 MB1,048,576 bytes Features: 5,340 Download GeoJSON

What is a GeoJSON file?

GeoJSON describes geographic shapes using JSON. A Feature pairs a geometry, such as a point, line string or polygon, with a set of properties, and a FeatureCollection groups features together.

Coordinates are longitude first, then latitude, in the WGS 84 reference system. Getting the order backwards is the most common mistake made with the format.

How to recognise a GeoJSON file

No signature bytes. GeoJSON files are identified by parsing their content.

Extension.geojson
MIME typeapplication/geo+json
StandardRFC 7946
Coordinate orderLongitude, latitude, optional elevation
Reference systemWGS 84
Geometry typesPoint, LineString, Polygon and their multi-part forms

What to test for

These are the behaviours that most often go wrong when software handles GeoJSON files.

Strengths of GeoJSON

  • Readable by every mapping library and GIS package.
  • Plain JSON, so it can be inspected and edited by hand.

Limitations of GeoJSON

  • Verbose for large datasets compared with binary formats.
  • Only one coordinate reference system, WGS 84, is allowed.

Typical uses of GeoJSON test files

  • Testing map layers and spatial queries
  • Checking coordinate-order handling
  • Load-testing map rendering with many features

Software that opens GeoJSON

  • QGIS and ArcGIS
  • Leaflet, Mapbox GL and OpenLayers
  • PostGIS, GDAL and Turf.js
  • GitHub renders .geojson files on a map

Specifications

Related

GeoJSON sample files: questions

Where are the sample features located?
Near sixteen real cities on six continents, with small random offsets, so the result is easy to check on a map.
What is the MIME type of a GeoJSON file?
The MIME type is application/geo+json. The file extension is .geojson.
Is a sample GeoJSON file the same as a dummy or example GeoJSON file?
Yes. Sample, test, dummy and example GeoJSON files are different names for the same thing: a GeoJSON file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy GeoJSON file.