CSV vs GeoJSON for Geographic Data
CSV is the most accessible format for point data with coordinates — any spreadsheet can open it. GeoJSON is a proper geographic format that supports all geometry types and is native to web mapping libraries. The right choice depends on your geometry, your tools, and your audience.
Bottom line
Use CSV for simple point data shared with non-GIS users. Use GeoJSON for web mapping, complex geometry, and proper spatial data workflows.
CSV vs GeoJSON: feature comparison
| Feature | CSV | GeoJSON |
|---|---|---|
| Geometry support | Points only (via lat/lon cols) | All types (Point, Line, Polygon, Multi-*) |
| Format type | Plain text (comma-separated) | JSON text |
| Opens in Excel | Yes (natively) | No (needs extension or conversion) |
| Spatial metadata | None | WGS 84 (per RFC 7946) |
| Web mapping | Limited (points only) | Native (Leaflet, Mapbox GL) |
| GitHub preview | Table only | Interactive map |
| Attributes | Yes (all columns) | Yes (properties per feature) |
| File size | Smallest for point data | Larger (JSON overhead) |
| GIS software | Supported (with CRS set) | Natively supported |
| Human readable | Yes | Yes |
CSVWhen to use CSV
- Sharing point datasets with non-GIS users who use Excel or Google Sheets
- Survey data, field observations, or incident reports with lat/lon
- Data that originates from a database export or spreadsheet
- Situations where file size matters and all data is point geometry
GeoJSONWhen to use GeoJSON
- Web maps that need to display lines, polygons, or mixed geometry
- Data loaded directly into Leaflet, Mapbox GL JS, or D3
- GitHub repositories with automatic map preview
- Any workflow that requires proper spatial metadata and CRS
- APIs serving geographic features to frontend applications
Convert between CSV and GeoJSON
Frequently asked questions
Q.Can I convert CSV to GeoJSON?
Yes. Upload your CSV to Maparz — it must have columns named lat/latitude and lon/lng/longitude. Maparz converts each row to a GeoJSON Point feature, preserving all other columns as properties.
Q.Can CSV store polygon data?
Not in a standard way. Some formats like WKT (Well-Known Text) can encode polygon geometry in a CSV column, but Maparz expects separate lat/lon columns for point data. For polygons, use GeoJSON or Shapefile.
Q.My CSV has X and Y columns, not lat and lon — will it work?
Maparz detects columns named x and y as longitude and latitude respectively. If your file uses projected coordinates (not WGS 84 degrees), you may need to reproject first in QGIS before uploading.
Q.Which is better for large datasets — CSV or GeoJSON?
For large point datasets, CSV is more compact because GeoJSON has JSON overhead per feature. For non-point geometry, GeoJSON is the only practical option. For very large datasets of any type, consider GeoPackage or FlatGeobuf.