GeoJSON Viewer
Open or paste GeoJSON to see it on a map with each feature's properties, and get a list of the problems the viewer's check finds against the GeoJSON standard, without uploading it.
How to view GeoJSON on a map
Paste or open it
On this page the paste box is open from the start: paste GeoJSON into it and press Open pasted map, or drop a .geojson or .json file on the map. A FeatureCollection, a single Feature or a bare geometry all open.
Read the problems list
Problems appear under the map, under the heading GeoJSON problems. If the text is not valid JSON, the list gives the line of the error. If it is valid JSON, the list names each place that breaks the rules the viewer checks, such as a polygon ring that does not close or a latitude above 90, by its path in the document, such as
$.features[3].geometry.coordinates. Features with no problem are drawn and a feature with a problem is left off the map; if none can be drawn, the paste box stays open so you can correct the text.Look at each feature
Choose a feature to zoom to it and see its properties in a table under Properties, with the length of a line or the area of a polygon.
Save or convert it
Use Export to save it as KML, KMZ, GPX, CSV or a Shapefile ZIP, or as GeoJSON again, written as one FeatureCollection.
What each base map sends, how lengths are measured and the limits: how the viewer works.
What the check looks for
The check runs in two steps. First the text must be valid JSON: for a missing comma or bracket, the list gives the line of the error. Then the structure must follow RFC 7946: the text is a FeatureCollection with a features array, a Feature, or a geometry; each feature's properties are an object or null; each geometry is one of the seven geometry types; each position is an array of at least two finite numbers, with the longitude between -180 and 180 and the latitude between -90 and 90; a line has at least two positions; and every polygon ring is closed and has at least four positions. Each problem is listed with its path in the document, up to 100 of them.
What the GeoJSON standard asks for
RFC 7946, published in August 2016, defines GeoJSON. Every position is longitude first, then latitude, in decimal degrees on the WGS 84 datum, with an optional third number for height in meters. A polygon ring is closed: its first and last positions are the same, and it has four or more. The standard asks for outer rings to run counterclockwise and holes clockwise, and also tells readers not to reject polygons that run the other way. The check does not report ring direction, and the viewer draws rings either way.
The 2008 GeoJSON format allowed other coordinate systems through a "crs" member; RFC 7946 removed it. A file whose numbers are eastings and northings from a projected coordinate system, which are usually far larger than 180, shows up in the check as positions out of range. Reproject it to longitude and latitude on WGS 84 in your GIS program before opening it here.
Properties and colors
When you choose a feature, its properties appear in a table under Properties. The viewer takes a feature's name from its name property and its description from description or desc, and the search box finds features by those two. If the properties hold the simplestyle keys (stroke, stroke-width, stroke-opacity, fill, fill-opacity, and marker-color for points), with colors written as #rgb or #rrggbb, the viewer draws the feature in those colors.
GeoJSON to KML, and KML to GeoJSON
Open GeoJSON and choose Download KML under Export: each feature becomes a placemark with its name and description, its other properties as data fields (ExtendedData) and its simplestyle colors as a KML style. The other way, open a KML or KMZ file and choose Download GeoJSON: the result is one FeatureCollection, with each placemark's name, description and data fields as properties and its style written as simplestyle properties. Google Earth on the web imports both formats.
Your GeoJSON stays on your device
Pasted text and opened files are read in your browser and never leave your device, and with the Outline map on, the map itself needs no server. Before each release, a test opens a file with a marker in its file name, a placemark name, a description, a data field and a folder name, and types another into the search box, while Google Analytics runs, and fails if a marker appears in any request.
Frequently asked questions
What is GeoJSON?
A format for geographic data written in JSON and defined by RFC 7946. It has seven geometry types (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection), a Feature that pairs a geometry with properties, and a FeatureCollection that lists Features.
Why does my GeoJSON show up in the wrong place?
Most often because latitude and longitude are swapped. GeoJSON puts longitude first, so [-74.0, 40.7] is in New York and [40.7, -74.0] is in Antarctica. If the numbers are far beyond 180 or 90, the file uses a projected coordinate system, and the problems list reports those positions as out of range.
Can I paste GeoJSON instead of opening a file?
Yes. On this page the paste box is open from the start. KML and GPX text can be pasted there too.
Does the direction of a polygon ring matter?
RFC 7946 asks for outer rings counterclockwise and holes clockwise, and also tells readers not to reject polygons wound the other way. The check does not report ring direction, and the viewer draws both.
Can Google Earth open GeoJSON?
Yes. Google Earth on the web and its phone apps import .geojson and .json files into a project, as editable features or as a data layer. Google My Maps does not list GeoJSON among its file types, so convert it to KML first.
Is my GeoJSON uploaded?
No. The text is read in your browser and never leaves your device. Google Analytics counts visits and the use of the paste box, never what you paste.