CSV with latitude / longitude columnsGeoJSON FeatureCollection (RFC 7946)
Map Visualizer →
Free Online GIS Converter

Convert CSV to GeoJSON Online Free

Spreadsheets and database dumps arrive as CSV with separate latitude and longitude columns, but web maps, Leaflet, Mapbox and most GIS tooling expect GeoJSON. This converter detects the coordinate columns automatically and promotes every remaining column to a feature property, so attributes survive the conversion instead of being flattened away.

Input (CSV)
GeoJSON FeatureCollection

SQL & Code Example

How to perform this conversion directly in your PostgreSQL / PostGIS database:

-- Build the same FeatureCollection straight from PostGIS
SELECT json_build_object(
  'type', 'FeatureCollection',
  'features', json_agg(ST_AsGeoJSON(t.*)::json)
)
FROM cities AS t;

Frequently Asked Questions

Which column names are detected as coordinates?+

Common spellings of both axes are recognised automatically — lat, latitude, y and lng, long, longitude, lon, x among them. The column order in your file does not matter.

What happens to my other columns?+

Every column that is not a coordinate becomes a key in that feature’s properties object, so names, ids, populations and categories all carry through.

Is my file uploaded anywhere?+

No. The conversion runs entirely in your browser — the CSV never leaves your machine.

Why is longitude first in the output?+

GeoJSON (RFC 7946) mandates [longitude, latitude] order, the opposite of how most spreadsheets label the columns. The converter handles the swap for you.

WKT Geometry Reference

Not sure your input is valid? Each geometry type has its own page with syntax rules, the mistake that most often breaks it, and PostGIS and Shapely recipes.

More GIS Converters