AZ Tools

GeoJSON Inspector & Validator (RFC 7946)

File

Parses any GeoJSON document — FeatureCollection, single Feature, GeometryCollection, or bare Geometry — and walks every Point / MultiPoint / LineString / MultiLineString / Polygon / MultiPolygon coordinate. Validates that coordinates are [lon, lat] pairs (with optional elevation), that longitude is in [−180, 180] and latitude in [−90, 90], and that Polygon rings close (first ≡ last). Lengths are computed with the haversine formula on a 6371 km spherical Earth, polygon areas with the standard spherical-excess formula (Σ(λ₂−λ₁)·(2+sin φ₁+sin φ₂) · R²/2). Inner rings are subtracted from outer rings to give the net area. A simple equirectangular map renders all geometries to scale — points as red dots, lines as blue strokes, polygons as semi-transparent green fills. Everything runs locally; your GeoJSON never leaves the browser.

How to use

  1. Paste GeoJSON into the textarea, drop in the Sample button's data, or load a .json / .geojson file.
  2. Read the summary — top-level type, feature count, total points / length / area, geometry-type breakdown, and bounding box.
  3. Check the errors and warnings panels — out-of-range longitudes, unclosed polygon rings, missing geometries are all flagged.
  4. Scroll to the SVG map preview for a quick visual sanity check, or the per-feature table for property keys.

Frequently asked questions

Is the area computation accurate?
Spherical-excess on a 6371 km sphere is good to roughly 0.5% globally; the actual Earth is an oblate ellipsoid (WGS-84) and using its flattening would give ~0.1% — for that you need a proper ellipsoidal area library (Karney's GeographicLib). For visualising sub-country-scale polygons the spherical version shown is more than enough.
Does GeoJSON enforce right-hand rule for polygons?
RFC 7946 says exterior rings should be counter-clockwise and interior (hole) rings clockwise. Older GeoJSON (the original 2008 spec) didn't require this — many tools still emit either orientation. This validator computes signed area to tell which way each ring is wound but doesn't reject either convention; if you're publishing GeoJSON for the web, run it through a winding-order fixer before shipping.
Why does my polygon area look wrong by a factor of cos(latitude)?
If you used a planar shoelace formula on raw lon/lat degrees you'd get exactly that error — degrees of longitude shrink as you head poleward. This tool uses the proper spherical formula, so the area is in true square metres regardless of where on Earth the polygon is.
What about TopoJSON / KML / Shapefile?
Not supported here — this tool is GeoJSON-only. TopoJSON is a topology-preserving compression of GeoJSON (use the topojson CLI to convert), KML is XML-based (use ogr2ogr from GDAL), and Shapefiles are a binary multi-file format that you'd convert via QGIS or ogr2ogr.

Related tools