Compare
GeoJSON vs JSON
GeoJSON is a JSON-based format with conventions for geographic features and geometries. General JSON can represent many kinds of structured data but does not by itself define coordinate or geometry semantics.
Which format should you choose?
Use GeoJSON for geographic features intended for compatible mapping tools; use general JSON for other structured data or when a different geospatial schema is required.
Good fit for GeoJSON
Exchange map features and properties
- Points, lines, and polygons in web maps
Good fit for JSON
Web APIs, configuration files, and data exchange
- Transferring structured data
Basic information
| Field | GeoJSON | JSON |
|---|---|---|
| Extension | .geojson, .json | .json |
| MIME type | application/geo+json | application/json |
| Common uses | Exchange map features and properties | Web APIs, configuration files, and data exchange |
| How to open | Open it in a GeoJSON-compatible map tool or text editor; inspect locations and geometry on a map. | Open it in a text editor, IDE, or JSON-aware viewer. |
| Export or convert | When converting, verify coordinate order, coordinate reference system, geometry, and properties in the destination tool. | Applications or conversion tools can convert it to formats such as CSV. |
Choose by use case
Points, lines, and polygons in web maps
Exchange map features and properties
GeoJSONTransferring structured data
Web APIs, configuration files, and data exchange
JSONKey point 1
GeoJSON defines structures for geographic geometries and features.
More on the differencesKey point 2
JSON is a general syntax for structured values.
More on the differencesMore on the differences
Check the consumer's GeoJSON version and coordinate conventions. Validate geometry and coordinates, and confirm that the mapping application interprets location and properties as intended.
- GeoJSON follows specific conventions layered on JSON.
- General JSON needs an agreed schema to express geographic meaning consistently.
- Converting to plain JSON may retain values while losing standard geographic semantics.
Frequently asked questions
Is every JSON file GeoJSON?
No. GeoJSON must follow its geographic object and geometry conventions.