The GeoJSON format runs the modern web map. So if you touch web mapping, you will meet it. This guide explains what the GeoJSON format is, and how to create and convert it.
GeoJSON is an open standard for map data. It is written in JSON, so it is plain text. As a result, JavaScript reads it natively. That is why the GeoJSON format is the default of web mapping.
Web tools speak JSON already. So GeoJSON drops straight into code. Also, it is human-readable, so you can inspect it by eye. Therefore it fits version control too.
The structure is simple. A file holds features. Each feature has a geometry and some properties. So the geometry is the shape, and the properties are the data. For example, a point plus its name.
GeoJSON supports several shapes. For instance, Point, LineString and Polygon. It also has multi versions of each. So one file can mix many shapes.
The standard, RFC 7946, uses WGS84 longitude and latitude. Also, coordinates are written longitude first. So the order is the reverse of how people say it.
Web maps are the main home. For example, Leaflet, Mapbox GL and OpenLayers all read it. So you pass features straight to the map. Also, many APIs return GeoJSON.
It is simple and universal. However, it is text, so large files get big. For huge datasets, a binary format is faster. So GeoJSON suits small to medium layers best.
You can make GeoJSON from what you have. For example, KML to GeoJSON, Shapefile to GeoJSON, or CSV to GeoJSON. Each runs in your browser, so nothing is uploaded. You can read the spec at geojson.org. In short, the GeoJSON format is the easiest way to put data on a web map.
GeoJSON is an open standard for encoding map data in JSON. It stores features, each with a geometry and properties, as plain readable text. It is the default vector format of web maps and APIs.
Web tools already speak JSON, so GeoJSON drops straight into JavaScript. Leaflet, Mapbox GL and OpenLayers read it natively, and it is human-readable, which makes it easy to inspect and version-control.
The RFC 7946 standard defines GeoJSON in WGS84 longitude and latitude, written longitude first. Some older tools assumed other systems, so set the CRS explicitly if a tool expects something else.
Convert data you already have. A browser-based converter turns KML, a shapefile or a CSV into GeoJSON locally, so nothing is uploaded. You can also export GeoJSON from QGIS.
GeoJSON is text, so very large datasets become heavy. For huge layers or streaming, a binary format like FlatGeobuf or a database is faster. GeoJSON suits small to medium layers best.