How to Convert Coordinates to GeoJSON
Paste latitude and longitude coordinate pairs (one per line) and this tool creates a GeoJSON FeatureCollection with a Point feature for each pair. Coordinates can be separated by commas, spaces, or tabs.
Enter coordinates in latitude, longitude order (the natural way humans read coordinates). The tool automatically converts them to GeoJSON's required [longitude, latitude] format.
Supported Input Formats
40.7484, -73.9857for comma-separated values40.7484 -73.9857for space-separated values40.7484\t-73.9857for tabs, which is what a spreadsheet paste gives you
One coordinate pair per line. Blank lines are ignored and there is no row limit beyond your browser's memory.
A header row is detected when the first row's opening cells are not numbers. If that header names its columns, using any of lat, latitude, lon, lng, long or longitude, the parser reads the coordinates from those columns whichever position they occupy. Without a header the first value is latitude and the second is longitude.
Every column that is not the coordinate pair becomes a feature property, keyed by its header name or by column_N when there is no header. Values that parse as numbers are stored as numbers.
Where These Coordinate Lists Come From
- Converting spreadsheet columns of coordinates into map-ready GeoJSON
- Creating GeoJSON from geocoding API results
- Importing GPS coordinate lists from text files or logs
- Building marker datasets from address lookup results
To extract coordinates back out of GeoJSON, use the GeoJSON to lat/long extractor.
A Spreadsheet Paste, Worked Through
Paste this table of San Francisco landmarks. The header names the coordinate columns and adds one of its own:
CSVname,latitude,longitude,height_m
Golden Gate Bridge,37.8199,-122.4783,227
Ferry Building,37.7955,-122.3937,75The converter finds the coordinate columns by name and carries the rest through as properties:
GeoJSON{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": { "name": "Golden Gate Bridge", "height_m": 227 },
"geometry": {
"type": "Point",
"coordinates": [-122.4783, 37.8199]
}
},
{
"type": "Feature",
"properties": { "name": "Ferry Building", "height_m": 75 },
"geometry": {
"type": "Point",
"coordinates": [-122.3937, 37.7955]
}
}
]
}The input reads latitude first, as people write coordinates. The output puts longitude first, as RFC 7946 requires. That reordering is the single most common source of points landing in the wrong ocean.
Reading a Messy Paste
The parser splits on newlines, picks a delimiter per line (comma if the line contains one, otherwise whitespace), and reads the coordinate columns identified by the header or by position. Features get a default name of Point 1, Point 2 and so on, which a name column overrides.
Rows that yield no usable coordinate pair are reported by line number. That matters more than it sounds: a trailing total row, a merged cell, or a stray N/A would otherwise shrink your dataset without saying so.
Once converted, view the points on a map to confirm they landed where you expected.