Web Vector.geojson · .jsonMIME: application/geo+json

GeoJSON

The JSON-based vector format that powers most web maps.

Specification
RFC 7946
Released
2008 (RFC 7946 in 2016)
When to use
Use GeoJSON when you need a single, human-readable file that any JavaScript library can render directly in a browser. It is the right choice for web maps built on Leaflet, Mapbox GL, MapLibre, or OpenLayers, for REST APIs that return spatial data, and for small to medium datasets that need to round-trip through Git or text-based diff tools.

What is GeoJSON?

GeoJSON is an open standard, defined by RFC 7946 in 2016, that encodes geographic features as JSON. A GeoJSON document represents a single Feature, a FeatureCollection, or a bare Geometry. Each Feature carries a geometry (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection) and an open-ended properties object that can hold any JSON-serialisable attribute. Coordinates are written as [longitude, latitude] in decimal degrees, with optional elevation as a third value. RFC 7946 fixed the coordinate reference system to WGS 84 (EPSG:4326); legacy GeoJSON 2008 files may still declare a custom CRS object, which modern validators flag as non-conformant. The format's strength is its simplicity: a GeoJSON file is plain UTF-8 text, parses with any JSON library, diffs cleanly in source control, and renders in browsers without a build step. The trade-off is verbosity — coordinate arrays are repeated for every shared edge, attribute keys are repeated on every feature, and large datasets balloon to many megabytes that the browser must parse before drawing the first pixel. For datasets over a few hundred thousand vertices, TopoJSON, Vector Tiles, or a GeoPackage usually performs better.

Supported by

  • QGIS (native read/write)
  • ArcGIS Pro and ArcGIS Online
  • GDAL/OGR (driver: GeoJSON)
  • Leaflet, Mapbox GL JS, MapLibre GL, OpenLayers
  • PostGIS (ST_AsGeoJSON, ST_GeomFromGeoJSON)
  • Turf.js, D3-geo
  • Python (geopandas, fiona, shapely)
  • R (sf package)

Strengths

  • Plain-text JSON — readable, diffable, parseable everywhere
  • Native to every modern web mapping library, no plugin needed
  • Open specification (RFC 7946), no vendor lock-in
  • Single file — no sidecar files to lose like Shapefile
  • Properties object is schema-free and accepts any JSON value

Weaknesses

  • Verbose: 3–5× larger than binary equivalents like GeoPackage or Shapefile
  • No spatial indexing — large files must be fully parsed before queries work
  • RFC 7946 hard-codes WGS 84; reprojected data is technically non-conformant
  • Mixed-geometry FeatureCollections are legal but break tools that expect uniform layers
  • No native styling — symbology must be added separately

Converters for GeoJSON

Validator

GeoJSON Validator

Check a GeoJSON file for structural validity, geometry integrity, and spatial metadata.

Frequently Asked Questions

Does GeoJSON support coordinate systems other than WGS 84?

Per RFC 7946 (2016), the answer is no: all GeoJSON must be in WGS 84 (EPSG:4326). The older GeoJSON 2008 spec allowed a 'crs' member, and you'll still encounter legacy files using it. Modern parsers either ignore the member or warn about it. If you need a projected CRS, reproject your data to WGS 84 first, or use a format that supports CRS metadata such as GeoPackage.

What's the practical file-size limit for GeoJSON?

There is no formal limit, but browsers struggle past 50–100 MB because the entire file must be parsed into JavaScript objects in memory. For larger datasets, convert to TopoJSON (smaller via topology encoding), vector tiles (loaded by viewport), or GeoPackage (binary with spatial index).

Can GeoJSON store raster data?

No. GeoJSON is a vector-only format. For raster data use GeoTIFF, Cloud-Optimized GeoTIFF (COG), or PNG/JPEG with a sidecar world file. You can however include raster styling URLs inside a feature's properties.

Why does my GeoJSON file open in Leaflet but fail in ArcGIS?

ArcGIS applies stricter validation than most web libraries. Common causes: unclosed polygon rings (first and last coordinate must be identical), mixed geometry types in a single FeatureCollection, or non-standard CRS declarations. Run the file through a strict validator before importing to professional GIS software.

Should I use .geojson or .json as the file extension?

Both are accepted. RFC 7946 recommends '.geojson' so that tools can dispatch on extension, but '.json' is widely used and the MIME type 'application/geo+json' is what actually matters for HTTP delivery.

Related Formats