CSV to GeoJSON
Paste a CSV (or drop a .csv file) and get a GeoJSON FeatureCollection. I auto-detect lat/lng (and aliases like longitude, x, y) or pull geometry from a WKT column when you have polygons or lines. Everything runs locally — your data never leaves the browser.
CSV to GeoJSON
Before you start
You need a CSV (comma, tab, semicolon, or pipe-separated — the parser sniffs the delimiter from the header row) with one of:
- A pair of latitude / longitude columns. I look for
lat,latitude,y,lat_ddfor the Y axis andlng,lon,long,longitude,x,lon_ddfor the X axis. Names are matched case-insensitively. - Or a WKT column (Well-Known Text) holding the geometry. I check headers
wkt,geometry,geom,the_geom,shape. The parser handlesPOINT,LINESTRING,POLYGON, and the multi-variants.
If your headers don't match the auto-detect list (e.g. you exported from a system that uses POINT_X/POINT_Y), type the exact header name into the override boxes above the panes and the converter will use those.
Everything happens in your browser. I don't see your file. There's no hard size limit — the CSV is parsed in a single pass — but tens of millions of rows will eventually exhaust the tab's memory.
How to use it
- Paste your CSV into the left pane, or drop a
.csv/.tsvfile. - If your column names are unusual, type them into lng col, lat col, or WKT col. Otherwise leave them empty for auto-detect.
- Click Convert.
- Review the right pane. The status bar reports how many features were built and how many rows were skipped (e.g. blank coordinates).
- Click Copy or Download .geojson. The result is also stashed in your session, so you can hop straight to the Viewer.
Options explained
lng / lat overrides
Use these when your CSV uses headers I don't recognize (e.g. POINT_X, centroid_lon, or a localized name). Type the header verbatim. The match is case-insensitive but otherwise exact — a leading or trailing space in the header still works because I trim both sides.
WKT override
Set this when your geometry column has a non-standard name. WKT takes precedence over lat/lng on a per-row basis — if a row has a valid WKT value, I use that; if it's blank or unparseable, I fall back to lat/lng for that row.
Example
Input (CSV with mixed Point + Polygon data via WKT):
name,population,wkt
Lake,0,"POLYGON((-122.5 37.7,-122.4 37.7,-122.4 37.8,-122.5 37.8,-122.5 37.7))"
Coffee Shop,1,"POINT(-122.4 37.7)"
Output (GeoJSON):
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": { "name": "Lake", "population": "0" },
"geometry": {
"type": "Polygon",
"coordinates": [[[-122.5,37.7],[-122.4,37.7],[-122.4,37.8],[-122.5,37.8],[-122.5,37.7]]]
}
},
{
"type": "Feature",
"properties": { "name": "Coffee Shop", "population": "1" },
"geometry": { "type": "Point", "coordinates": [-122.4, 37.7] }
}
]
}
Notice that the spatial column (wkt) is consumed by the geometry and removed from properties, while everything else carries through verbatim.
Tips & common pitfalls
- Coordinate order is the #1 footgun. CSV exports vary wildly — some use
lat, lng, some uselng, lat. I match by column name, not position, so as long as your header is honest, the output is correct. If your points show up off Madagascar instead of in Texas, you probably mislabeled a column. - Numbers in quotes are fine. A cell like
"-122.4"parses cleanly. Locale-formatted numbers like-122,4(European decimals) do not — convert those to dot-decimals first. - Null-ish values are tolerated. Cells equal to
NULL,N/A,NA,None, or\Nare treated as missing. Rows with no usable geometry are skipped (counted in the status bar) instead of producing broken features. - WKT with Z/M ordinates. If you have
POINT Z(1 2 3)or POINT M, the Z/M flag is recognized but only X and Y are kept. Add anelevationproperty column if you need to preserve altitude. - Property values stay as strings. CSV has no real type system, so I leave numbers and booleans as strings. If your downstream tool needs typed properties, transform them after the conversion.
Troubleshooting
"No spatial columns found."
Your header row doesn't include any of the auto-detected names. Either rename the columns to lat/lng (or wkt), or type the actual header text into the override boxes above the panes.
The status bar says "N row(s) skipped."
Those rows had blank, non-numeric, or unparseable geometry. Open the original CSV at the reported row count to see what went wrong — common causes are stray summary rows at the bottom or empty cells where coordinates should be.
Output is one giant feature per cell.
Your CSV is probably tab- or semicolon-separated and the parser misread the delimiter from the first line. Try saving it as proper comma-CSV from your spreadsheet, or set the explicit override columns so the picker doesn't matter.
Polygons look like a tangled mess on the map.
WKT polygons must close (last vertex = first vertex). A few exporters drop the closing point. Fix that in the source, or post-process the GeoJSON with the Simplify tool, which often heals minor issues.
Related tools
See also: if you need to do something adjacent on this site, try GeoJSON to CSV to flatten a feature collection back into a CSV table, GeoJSON Viewer to map your converted data, or GeoJSON Validator to lint the result.
Frequently asked questions
What delimiters are supported?
Comma, tab, semicolon, and pipe (|). The parser sniffs the most likely delimiter from your header row. If the auto-detect picks wrong, save the file with explicit commas.
Does it handle quoted cells with commas or newlines?
Yes. Cells wrapped in double quotes can contain the delimiter, doubled quotes ("") for an escaped quote, and embedded newlines. The output stays intact.
What if my CSV has many millions of rows?
The conversion happens in browser memory, so the practical ceiling is a few hundred MB on a typical laptop. For very large datasets I'd convert in chunks or use a CLI like ogr2ogr on your machine.
Why are my numeric properties strings in the output?
CSV is type-less; I don't guess. If you need numbers as numbers, run a small post-processing pass with jq or any JSON tool, or use the Formatter to inspect first.
Is my file uploaded anywhere?
No. The whole conversion is JavaScript in your tab. Disconnect your network and it still works.