Web & Standards

GeoJSON Feature JSON Example

A GeoJSON Feature JSON example following RFC 7946 — includes geometry (Point), coordinates, and properties. Copy-ready for maps, Leaflet, Mapbox, and geospatial APIs.

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [
      72.5714,
      23.0225
    ]
  },
  "properties": {
    "name": "Sabarmati Riverfront",
    "city": "Ahmedabad",
    "category": "park",
    "rating": 4.6
  }
}

Field Reference

typerequiredstringAlways 'Feature' for a single feature object
geometry.typerequiredstringGeometry kind: Point, LineString, Polygon, MultiPolygon, etc.
geometry.coordinatesrequiredarrayCoordinates as [longitude, latitude] — note the order is lon, lat
propertiesrequiredobject | nullArbitrary attributes for the feature; may be null but the key must exist

Variants

FeatureCollectionMultiple features wrapped in a collection — the most common top-level GeoJSON.
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          72.5714,
          23.0225
        ]
      },
      "properties": {
        "name": "Sabarmati Riverfront"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          72.5797,
          23.0339
        ]
      },
      "properties": {
        "name": "Kankaria Lake"
      }
    }
  ]
}
Polygon geometryA closed area; the first and last coordinate must match.
{
  "type": "Feature",
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          72.56,
          23.02
        ],
        [
          72.58,
          23.02
        ],
        [
          72.58,
          23.04
        ],
        [
          72.56,
          23.04
        ],
        [
          72.56,
          23.02
        ]
      ]
    ]
  },
  "properties": {
    "name": "Zone A"
  }
}

Common Use Cases

  • Rendering markers and shapes on Leaflet, Mapbox, or Google Maps
  • Exchanging geospatial data between mapping APIs and databases (PostGIS)
  • Storing points of interest with coordinates and attributes
geojsonmapsgeospatialcoordinatesleafletmapbox

Validate or format this JSON

One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.

Frequently Asked Questions

GeoJSON (RFC 7946) mandates [longitude, latitude] order to match the x, y convention. This trips many people up because mapping libraries like Leaflet use [lat, lng] in their APIs. Always double-check the order when converting between formats.

A Geometry is just the shape (type + coordinates). A Feature wraps a geometry with 'properties' (attributes like name or category) and an optional id. A FeatureCollection holds many Features. Most apps work with Features so they can attach metadata.

Yes. For Polygon and MultiPolygon, each linear ring must start and end with the same coordinate pair. Many tools tolerate unclosed rings, but per the spec they should be explicitly closed.

Related JSON Examples