GeoJSON is a JSON-based format for representing geographic features such as points, lines, and polygons. It is defined by RFC 7946 and has become the default interchange format for web mapping, APIs, and modern GIS workflows because it is simple to parse, easy to share, and works naturally with JavaScript tooling.
To preview a file quickly, use the free online GeoJSON viewer.
What GeoJSON contains
A GeoJSON document is organized around a few key structures:
FeatureCollection— the top-level container that groups multiple features togetherFeature— an individual geographic entity with ageometryandproperties- Geometry types:
Point,LineString,Polygon,MultiPoint,MultiLineString,MultiPolygon, andGeometryCollection properties— a freeform JSON object for attributes like names, IDs, categories, or any metadata
Example of a minimal GeoJSON FeatureCollection:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-122.4194, 37.7749]
},
"properties": {
"name": "San Francisco",
"population": 808437
}
}
]
}
When GeoJSON is a good choice
Use GeoJSON when you need:
- A lightweight interchange format for web maps and APIs
- Easy integration with JavaScript, Python, and R tooling — most languages can parse JSON without any GIS libraries
- A human-readable format you can inspect, diff, and debug in any text editor
- Single-file distribution with no sidecar-file headaches
- Git-friendly versioning — because GeoJSON is plain text, diffs are meaningful
Limitations to know
- File size — JSON is verbose. A dataset with millions of features can produce files that are 3-5x larger than binary equivalents like Shapefile or FlatGeobuf.
- No built-in spatial indexing — filtering or querying large GeoJSON files requires loading the whole file into memory first.
- CRS is effectively WGS 84 only — RFC 7946 explicitly specifies WGS 84 (EPSG:4326). While some tools tolerate other CRSs, it is not officially supported.
- No schema enforcement — properties are untyped JSON objects, which can cause issues in strict data pipelines.
- No built-in styling — styling is handled by the map application, not the file format itself.
How to open GeoJSON online
- Go to the GeoJSON viewer.
- Upload your
.geojsonor.jsonfile (or paste the content directly). - Inspect the map and attribute table to confirm the data is correct.
No upload to any server — all processing happens locally in your browser.
How to validate GeoJSON
Before publishing GeoJSON to a web map or API, validate it for RFC 7946 compliance. The free GeoJSON validator catches common errors:
- Invalid coordinate ranges (latitude outside ±90°, longitude outside ±180°)
- Mismatched geometry type arrays
- Missing required properties in Feature or FeatureCollection structures
- Nested coordinate depth issues in multi-geometry types
Read the full guide: How to Validate GeoJSON Files
Converting to or from GeoJSON
Common conversions:
- Shapefile to GeoJSON: /shapefile-to-geojson/ — brings legacy GIS data into web-ready format
- KML to GeoJSON: /kml-to-geojson/ — converts Google Earth overlays
- GPX to GeoJSON: /gpx-to-geojson/ — converts GPS tracks and waypoints
- GeoJSON to Shapefile: /geojson-to-shapefile/ — for stakeholders who need Shapefile delivery
- GeoJSON to KML: /geojson-to-kml/ — for Google Earth visualization
All conversions run locally in your browser — no server uploads.
GeoJSON vs other formats
- GeoJSON vs Shapefile — web-native JSON vs legacy multi-file binary
- GeoJSON vs GeoPackage — when to move from flat files to a database container
- KML vs GeoJSON — XML-based KML vs JSON-based GeoJSON
- GPX vs GeoJSON — GPS track format vs general-purpose vector format
Related reading
- GeoJSON RFC 7946 — the official specification
- Free GeoJSON Validator Tool
- GeoJSON to Shapefile Converter