GeoJSON & Map Tools

GeoJSON Map Visualizer and Validator

Paste or upload a GeoJSON document, render it on a map, and validate it against RFC 7946 with errors pinpointed to the offending coordinate, ring, or geometry. The live app keeps the tool first: enter details, generate a result, then copy, download, or share the output.

geojson_map_visualizer_and_validator_home_home

Validate GeoJSON against RFC 7946, not just JSON syntax

A document can be valid JSON and still be invalid GeoJSON. GeoJSON Lens runs RFC 7946 structural checks on every geometry: the root type must be a FeatureCollection, Feature, or geometry; positions must contain at least two finite numbers; longitude must stay within -180 to 180 and latitude within -90 to 90; polygon linear rings must be closed; and the right-hand rule requires counterclockwise exterior rings with clockwise holes. Each finding carries the exact path, feature index, ring index, and coordinate index so you can jump straight to the offending vertex instead of guessing.

Latitude and longitude order is the most common GeoJSON bug

RFC 7946 positions are [longitude, latitude], but GIS databases, CAD exports, and hand-written JSON routinely emit [latitude, longitude] instead. The file still parses and often still validates, so the mistake only shows up when features render in the wrong hemisphere or off the coast of Africa. The order checker looks for the one deterministic signal: a value beyond ±90 in the second slot cannot be a latitude, which proves the pair was written latitude-first. Every swapped position is reported with its exact path so you can confirm the diagnosis before rewriting anything.

Render the document on a map before you ship it

Validation catches structure, but maps catch intent. The viewer projects every coordinate into an equirectangular map canvas with fit-bounds zoom, hover highlighting, and a feature HUD that reports geometry type, vertex count, and properties. Polygons render as filled areas, lines as stroked paths, and points as markers, so you can confirm that a district sits where you expect before the file reaches production.

Repair and simplify without leaving the browser

When the validator reports unclosed rings or reversed winding order, Polygon Repair rewrites the geometry in place: it closes every ring, enforces the right-hand rule, removes duplicate consecutive vertices, and clamps out-of-range coordinates. Simplify applies Douglas-Peucker tolerance to reduce vertex counts for faster rendering, and both modes report exactly how many vertices were changed so the result stays auditable.

Export GeoJSON or SVG for the next step

Every mode keeps the output copyable and downloadable. Copy or download the validated GeoJSON, export the simplified document, or generate a standalone SVG vector map for design tools. Export actions emit the standard tool events, and the last document plus saved map notes persist locally so you can return to the same workspace.

Private by design and deterministic by construction

Parsing, validation, repair, simplification, and SVG generation all run as pure JavaScript in the current tab. No upload, no account, no API key, and no third-party tile request. The same input always produces the same diagnostics and the same exported file, which makes the tool safe to use with sensitive boundary data.

Related tools and pages

Frequently Asked Questions

What does an RFC 7946 validator check that JSON.parse does not?

JSON.parse only confirms the text is syntactically valid JSON. RFC 7946 validation additionally checks GeoJSON object types, position dimensionality and numeric ranges, polygon ring closure, right-hand winding order, self-intersection, antimeridian splits, and the bbox member length. GeoJSON Lens reports each of those findings with a precise coordinate path.

Is GeoJSON [lat, lon] or [lon, lat]?

GeoJSON always uses [longitude, latitude]. RFC 7946 section 3.1.1 defines a position as an array of numbers where the first element is longitude and the second is latitude, with an optional third element for altitude. Documents written as [lat, lon] render mirrored or displaced, and the coordinate order checker detects that case and swaps it back in one click.

Why is my polygon reported as having the wrong winding order?

RFC 7946 section 3.1.6 requires exterior rings to be counterclockwise and interior rings (holes) to be clockwise, using the right-hand rule. Many shapefile and CAD exports still use the older clockwise-exterior convention. Polygon Repair rewrites the rings to the RFC 7946 order in one click.

What is the antimeridian warning in RFC 7946 section 3.1.9?

A geometry that crosses the 180th meridian should be split so that no segment jumps more than 180 degrees of longitude. The validator flags any consecutive coordinate pair whose longitude difference exceeds 180 degrees, which usually means the geometry was cut instead of split.

Can I upload a KML or WKT file instead of GeoJSON?

Yes. The parser accepts .geojson and .json documents, KML placemark coordinates, and WKT geometry strings such as POLYGON and MULTIPOLYGON. Non-GeoJSON input is converted into a FeatureCollection before validation so every downstream check still applies.

Is my GeoJSON uploaded to a server?

No. All parsing, validation, repair, simplification, and SVG export happen locally in your browser. Saved map notes use a local storage fallback, and the optional Axle adapter only activates when a backend base URL is configured.

How do I export a GeoJSON map as SVG?

Switch to SVG Export, run the tool, and use the download action. The generated SVG contains the projected polygons, lines, and points with viewBox bounds derived from the document extent, so it opens cleanly in Figma, Illustrator, or Inkscape.