GeoJSON Viewer & Validator

GIS & Geography Tools

Draws GeoJSON on a map and validates it against RFC 7946. It checks ring closure, winding order and coordinate ranges, and whether a declared bbox still matches the data. Everything runs in your browser.

Properties

Click a shape on the map to see the properties of that feature.

GeoJSON Guide

How to Use

Paste your GeoJSON into the text area and press View GeoJSON. Valid input is drawn on the map and reformatted with two-space indentation. The checks listed below are reported as errors and warnings. Click a shape to see the properties of that feature. If the document declares a bbox, it is drawn on the map as an orange dashed rectangle. Your input is never cleared, so you can fix it where it is.

The Nine GeoJSON Types

Point

A single position.

{ "type": "Point", "coordinates": [139.7, 35.68] }

MultiPoint

An array of positions.

{
  "type": "MultiPoint",
  "coordinates": [[139.7, 35.68], [135.5, 34.7]]
}

LineString

Two or more positions forming a line.

{
  "type": "LineString",
  "coordinates": [[139.7, 35.68], [135.5, 34.7]]
}

MultiLineString

An array of LineStrings.

{
  "type": "MultiLineString",
  "coordinates": [
    [[139.70, 35.69], [139.77, 35.71]],
    [[139.70, 35.66], [139.77, 35.65]]
  ]
}

Polygon

One or more closed rings. The first ring is the outer boundary; any others are holes.

{
  "type": "Polygon",
  "coordinates": [
    [
      [139.7, 35.6], [139.8, 35.6],
      [139.8, 35.7], [139.7, 35.7],
      [139.7, 35.6]
    ]
  ]
}

MultiPolygon

An array of Polygons.

{
  "type": "MultiPolygon",
  "coordinates": [
    [
      [
        [139.7, 35.6], [139.8, 35.6],
        [139.8, 35.7], [139.7, 35.7],
        [139.7, 35.6]
      ]
    ],
    [
      [
        [139.82, 35.6], [139.92, 35.6],
        [139.92, 35.7], [139.82, 35.7],
        [139.82, 35.6]
      ]
    ]
  ]
}

GeometryCollection

A collection of geometries of mixed types.

{
  "type": "GeometryCollection",
  "geometries": [
    { "type": "Point", "coordinates": [139.70, 35.66] },
    {
      "type": "LineString",
      "coordinates": [
        [139.74, 35.68], [139.77, 35.71]
      ]
    }
  ]
}

Feature

A geometry paired with a "properties" object. Properties carry information about the shape — a name, a population count, a category — rather than its geometry. Click a feature on the map to see them.

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [139.7, 35.68]
  },
  "properties": { "name": "Tokyo" }
}

FeatureCollection

An array of Features. To put more than one shape in a single document, list them here. This is the most common top-level type for real data.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [139.7, 35.68]
      },
      "properties": { "name": "Tokyo" }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [135.5, 34.7]
      },
      "properties": { "name": "Osaka" }
    }
  ]
}

About the bbox (bounding box)

A bbox is the rectangle enclosing the whole document. It lets you see what extent the data covers without reading every coordinate. Editing the geometry puts it out of date, so generating it from the data is safer than typing it by hand. Write it as four numbers in the order west, south, east, north, or six for three dimensions with the minimum and maximum elevation. It is optional, and it can sit on a FeatureCollection, a Feature or a geometry. This page draws a declared bbox on the map as an orange dashed rectangle.

{
  "type": "Polygon",
  "bbox": [139.7, 35.6, 139.8, 35.7],
  "coordinates": [
    [
      [139.7, 35.6], [139.8, 35.6],
      [139.8, 35.7], [139.7, 35.6]
    ]
  ]
}

Tips

  • Most syntax errors come from a trailing comma, single quotes instead of double quotes, or unquoted keys. The error message reports the character position, so start reading there.
  • If a shape lands somewhere unexpected, suspect the coordinate order first. GeoJSON wants [longitude, latitude], but most map apps display "latitude, longitude", so copying from one to the other swaps them. A swap is caught as an error wherever the longitude exceeds 90, but between 90°W and 90°E both values stay in range and it passes unnoticed.
  • Data in a projected coordinate system — UTM, State Plane, Japan Plane Rectangular CS — must be reprojected to WGS84 before it will land in the right place.

What gets checked

Every time you press View GeoJSON, the document is checked against RFC 7946. Anything that makes the data impossible to draw is reported as an error; anything that still draws but should be fixed is reported as a warning. Nothing is uploaded — validation runs entirely in your browser.

Errors

  • The text does not parse as JSON.
  • A "type" is not valid for its position: the top level has to be one of the nine GeoJSON types, and a nested geometry one of the seven that are neither Feature nor FeatureCollection.
  • A single position is not an array of at least two finite numbers: an empty array where a position belongs, one number instead of two, or numbers written as strings.
  • A coordinate falls outside longitude ±180 or latitude ±90. Positions written as [latitude, longitude] show up here.
  • The nesting of "coordinates" does not match the geometry type, or it differs between branches.
  • A required member is missing.
  • A ring or a line has too few positions. A polygon ring needs four or more, a line two or more.

Warnings

  • A ring is not closed: its first and last positions differ.
  • A ring breaks the right-hand rule. Outer rings should run counterclockwise and holes clockwise.
  • The third element of a position is not a number. It is the altitude, and it is optional, but it has to be numeric if it is there.
  • Something is wrong with the bbox: it cannot be read, its south is above its north, or the data falls outside it.
  • Something is wrong with the attributes: a Feature has no "properties", an "id" is neither a string nor a number, or the same property is a number in one feature and a string in another.
  • A GeometryCollection contains another GeometryCollection. The specification recommends against nesting them.
  • The document declares a "crs" member. RFC 7946 removed it and fixes all coordinates to WGS84, so its presence suggests the data may be in another reference system.

Glossary

RFC 7946
The specification that defines GeoJSON. It fixes the coordinate reference system to WGS84 and the coordinate order to longitude then latitude, and defines exactly nine types. Documents written against the older 2008 GeoJSON 1.0 spec may use other coordinate systems.
CRS (coordinate reference system)
The agreement that decides what place a pair of numbers refers to. The same [139.7, 35.68] points somewhere different depending on which CRS you read it in. The 2008 version of GeoJSON had a "crs" member for declaring one; RFC 7946 dropped it and settled on WGS84 for everything, so a document that still carries "crs" predates the spec and may not be in WGS84 at all.
WGS84
The datum RFC 7946 fixes every coordinate to — the one GPS reports and web maps assume. A datum says where the coordinate system is anchored relative to the earth, so the same longitude and latitude means a different place under a different datum. Nothing in the numbers gives this away: a legacy datum stays comfortably inside ±180 and ±90 and lands a few hundred metres off.
The right-hand rule
The direction a polygon ring is wound. RFC 7946 asks for outer rings counterclockwise and holes clockwise. MapLibre and Leaflet draw a ring wound either way, so nothing looks different on the map. The consumers that read winding are the ones that store and search the data: Elasticsearch geo_shape takes a reversed polygon for one that crosses the dateline.

FAQ

Q: Is the GeoJSON I paste sent to a server?
A: No. Parsing, validation and rendering all happen in your browser. Nothing is sent to a server, so you can paste data you are not allowed to share.
Q: Why do I get "Valid JSON, but not GeoJSON"?
A: Your input parsed correctly as JSON, but its "type" field is missing or is not one of the nine GeoJSON types. A plain object such as {"a":1} is valid JSON and still not GeoJSON.
Q: What exactly does it validate?
A: Errors, which stop anything being drawn: text that does not parse as JSON, a type that is not valid in the position it appears, positions that are not pairs of finite numbers or fall outside longitude ±180 and latitude ±90, a "coordinates" nesting that does not match the geometry type, missing required members, and rings or lines with too few positions. Warnings, which still draw: unclosed rings, rings that break the right-hand rule, and a bbox that cannot be read or does not contain the data. Coordinate precision is not checked. The "What gets checked" section lists them one by one.
Q: Which comes first in GeoJSON, longitude or latitude?
A: Longitude comes first. RFC 7946 requires the first two elements to be longitude and latitude, in that order, and a bbox follows the same axis order: west, south, east, north. Many maps, Google Maps among them, show coordinates as "latitude, longitude", which makes it easy to get backwards, but GeoJSON always puts longitude first. Values written the other way usually land outside the valid range and are reported as an error.

Related Tools & Games