— Developer Tools

Free GeoJSON Viewer and Validator

Paste GeoJSON, WKT or KML to see the shapes on a map, find what’s wrong with them, and convert between GeoJSON and WKT.

— Samples
Features 3Errors 0Warnings 0Valid
Live

What is a GeoJSON Viewer and Validator?

GeoJSON is the JSON format for points, lines and areas on Earth, used by web maps, PostGIS exports and most location APIs. This tool draws GeoJSON on a map, checks it against RFC 7946, and converts it to and from WKT.

It also reads WKT and EWKT from databases and KML from Google Earth, detecting the format from what you paste. The checks catch the mistakes that put shapes in the ocean or make other tools reject them, such as latitude written first or a ring that isn’t closed.

Key Features

Shapes on a Map

Points, lines and polygons, including holes and multi-part shapes, are drawn with their names as tooltips.

An RFC 7946 Check

Swapped or out-of-range coordinates, open or short rings, wrong winding and the removed crs member are listed with their location.

GeoJSON to WKT and Back

Convert features to one WKT line each for SQL, or turn WKT and KML into a GeoJSON FeatureCollection.

Three Formats, Detected

Paste GeoJSON, WKT with or without an SRID prefix, or KML placemarks, and the format is recognised from the text.

Data Read Locally

Your shapes are parsed in the browser. Only the map tiles are fetched, as described in the privacy answer below.

Perfect for everyone

  • Web map developers
  • GIS analysts moving data between PostGIS and the web
  • Anyone checking a GeoJSON file before using it

How to Use the GeoJSON Viewer and Validator

Paste or open your shapes, then read the map, the check, or the converted output.

1

Paste or Open the Shapes

GeoJSON, WKT and KML are all accepted. Open .geojson, .kml or .wkt files with the button.

2

Look at the Map

Every feature is drawn above the output. A shape in the wrong place usually means swapped coordinates.

3

Run the Check

Validate lists errors that break other tools and warnings worth fixing, each with the feature and position.

4

Convert

Choose To GeoJSON or To WKT, then copy or download the result.

Worked Examples

Shapes, Checked and Converted

Each row is a shape as pasted, and each answer is this tool’s output in the mode on the chip. Guess what’s wrong before you reveal it.

REF_001Summary of two features

“{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Ferry Building"},"geometry":{"type":"Point","coordinates":[-122.3937,37.7955]}},{"type":"Feature","properties":{"name":"Embarcadero walk"},"geometry":{"type":"LineString","coordinates":[[-122.3937,37.7955],[-122.388,37.789],[-122.387,37.781]]}}]}”

REF_002Latitude written first

“{"type":"Point","coordinates":[-33.8568,151.2153]}”

REF_003Clockwise outer ring

“{"type":"Polygon","coordinates":[[[2.2945,48.8584],[2.2950,48.8588],[2.2955,48.8584],[2.2950,48.8580],[2.2945,48.8584]]]}”

REF_004Ring left open

“{"type":"Polygon","coordinates":[[[13.37,52.51],[13.38,52.51],[13.38,52.52],[13.37,52.52]]]}”

REF_005Old crs member

“{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"name":"Dock"},"geometry":{"type":"Point","coordinates":[4.8897,52.3779]}}]}”

REF_006WKT to GeoJSON

“POLYGON ((-122.3904 37.7912, -122.3888 37.7899, -122.3879 37.7906, -122.3895 37.7919, -122.3904 37.7912))”

REF_007GeoJSON to WKT

“{"type":"Feature","properties":{"name":"Pier 39"},"geometry":{"type":"Point","coordinates":[-122.4098,37.8087]}}”

REF_008KML to WKT

“<kml xmlns="http://www.opengis.net/kml/2.2"><Document><Placemark><name>Harbour loop</name><LineString><coordinates>-3.1883,55.9533,0 -3.1750,55.9800,0 -3.1700,55.9760,0</coordinates></LineString></Placemark></Document></kml>”

REF_009WKT missing a parenthesis

“LINESTRING (30 10, 10 30, 40 40”

REF_010A geometry type GeoJSON doesn’t have

“{"type":"Circle","coordinates":[-0.1246,51.5007],"radius":100}”

GeoJSON Objects

The Ten GeoJSON Object Types

RFC 7946 defines seven geometries and three wrappers. Each card gives the coordinates each one expects.

01 / POINT

Point

One position: longitude, latitude and an optional altitude in metres.

“Which number comes first?”

02 / MULTIPOINT

MultiPoint

A list of positions that belong together, such as all the stops of one bus line.

“Is it a list of points or of positions?”

03 / LINESTRING

LineString

Two or more positions joined in order, such as a road or a route.

“How many positions at minimum?”

04 / MULTILINESTRING

MultiLineString

Several separate lines in one geometry, such as a river with branches.

“Must the lines touch?”

05 / POLYGON

Polygon

An outer ring and optional holes. Each ring is closed, repeating its first position at the end.

“How many positions does a triangle’s ring have?”

06 / MULTIPOLYGON

MultiPolygon

Several polygons in one geometry, such as a country with islands.

“How deep is its coordinate nesting?”

07 / GEOMETRYCOLLECTION

GeometryCollection

Mixed geometries in one object. RFC 7946 advises using a FeatureCollection instead where possible.

“Does it have a coordinates member?”

08 / FEATURE

Feature

A geometry plus properties, and an optional id. The geometry may be null.

“Can a feature have no geometry?”

09 / FEATURECOLLECTION

FeatureCollection

A features array, the usual top level of a GeoJSON file.

“What member holds the features?”

10 / BBOX

bbox

An optional member giving west, south, east and north bounds, used to zoom a map without reading every position.

“In what order are its numbers?”

Formats This Tool Reads

Paste any of these and the format is detected from the first characters: a brace or bracket means GeoJSON, an angle bracket means KML, and a geometry keyword means WKT.

GeoJSON

Geometries, Features or FeatureCollections per RFC 7946, with or without the older crs member.

WKT

Well-known text from databases and GIS tools, including Z dimensions, EMPTY shapes and several shapes one per line.

EWKT

PostGIS’s extended form with an SRID=4326; prefix. Other SRIDs get a warning that the coordinates may be projected.

KML

Placemarks with points, lines, polygons and MultiGeometry from Google Earth and My Maps, in any folder.

Not Supported

TopoJSON, shapefiles and GeoPackage need conversion first. GPX tracks have their own viewer.

The RFC 7946 Rules That Trip People Up

Most GeoJSON that other tools reject breaks one of these. The Validate mode checks each of them and names the feature and position where the problem sits.

Tip 01

Longitude Before Latitude

Positions are x, y: longitude first. Leaflet and Google Maps take latitude first, which is where the swap usually comes from.

Tip 02

WGS 84 Only

Coordinates are degrees on WGS 84. Projected metres from Web Mercator or a national grid need reprojecting first.

Tip 03

Closed Rings

A polygon ring repeats its first position at the end, so a triangle has four positions.

Tip 04

Right-Hand Rule

Outer rings run counterclockwise and holes clockwise. Readers shouldn’t reject the other way, but some renderers fill the wrong side.

Tip 05

No crs Member

The 2008 format allowed a crs member, and RFC 7946 removed it. Drop it, and keep coordinates in WGS 84.

Tip 06

Six Decimal Places

Six decimals is about 10 cm, which is plenty for most data. More digits only make files larger.

How Conversion Works

Converting between formats keeps the shapes exactly, but each format can carry different extras. These are the rules this tool follows, so you know what to expect in the output and what to add back by hand.

One WKT Line per Feature

To WKT writes each feature’s geometry on its own line, in input order. That suits a batch of INSERT statements or a spreadsheet column.

Properties Stay Behind

WKT holds geometry only, so feature properties aren’t written. Keep the GeoJSON if you need names and attributes alongside the shapes.

Altitude Becomes Z

Positions with a third number are written as POINT Z or LINESTRING Z, the form PostGIS and GDAL expect for 3D shapes.

Null Geometry

A feature with no geometry becomes GEOMETRYCOLLECTION EMPTY in WKT, and POINT EMPTY becomes a feature with a null geometry in GeoJSON.

KML Names Become Properties

A placemark’s name and description are kept as properties in GeoJSON. Styles, icons and folders aren’t, since GeoJSON has no place for them.

Numbers Are Kept as Written

Coordinates aren’t rounded or reprojected during conversion. If the input has fifteen decimals, so does the output.

Collections Stay Collections

A GeoJSON GeometryCollection becomes a WKT GEOMETRYCOLLECTION with each member inside, and a KML MultiGeometry becomes a GeometryCollection in GeoJSON.

SRID Prefixes Are Dropped

An EWKT SRID=4326; prefix is read and removed, since GeoJSON is always WGS 84. Any other SRID still converts, with a warning to reproject first.

GeoJSON Pitfalls

Beyond the spec, these cause most broken maps. None of them make the file invalid, which is why they slip through until the data is on a screen.

Tip 01

Shapes in the Gulf of Guinea

Points near 0, 0 off West Africa usually mean missing or zeroed coordinates, not real data.

Tip 02

Crossing the Antimeridian

A line from 179° to -179° draws the long way round the world. RFC 7946 suggests splitting it at 180°.

Tip 03

Huge Files on Web Maps

Megabytes of GeoJSON slow every map. Simplify geometry or switch to vector tiles for large datasets.

Tip 04

Properties as Strings

Numbers saved as text sort and filter wrongly in most tools. Check property types after converting from CSV.

Tip 05

KML Altitude Modes

KML altitudes can be relative to the ground or the sea. GeoJSON keeps only the number, not how to read it.

Tip 06

Map Tiles and Privacy

Your data stays local, but the background map loads tiles for the area shown from OpenStreetMap.

When to Use This Tool

Whenever you have shapes in one format and need to see them, check them or move them somewhere else, such as a database, a web map or a colleague’s GIS.

Checking an API Response

See whether a location API returns longitude first and closed rings before your map shows nonsense.

Moving Data to PostGIS

Turn GeoJSON features into WKT for an INSERT with ST_GeomFromText, one line per feature.

Reading Database Exports

Paste WKT from a query result and see it on a map without opening a GIS.

Converting Google Earth Files

Turn KML placemarks into GeoJSON for Leaflet, Mapbox or a static site.

Fixing Rejected Uploads

When a service refuses a GeoJSON file, the check shows which feature and position break the rules.

Frequently Asked Questions