GeoJSON Viewer - View & Validate GeoJSON
Free GeoJSON viewer: view, validate and visualize GeoJSON data on interactive map. Display points, lines, polygons. Check GeoJSON syntax and structure.
What is GeoJSON?
GeoJSON is an open standard format for encoding geographic data structures using JSON (JavaScript Object Notation). It supports various geometry types including points, lines, polygons, and multi-part collections of these types.
GeoJSON is widely used in web mapping applications, GIS software, and location-based services. It's human-readable, easy to parse, and supported by most modern mapping libraries and tools.
Key features of GeoJSON:
- Simple Format: Easy to read and write, based on JSON
- Widely Supported: Compatible with Leaflet, OpenLayers, Google Maps, Mapbox
- Rich Data: Can include properties and metadata for each feature
- Standard Format: RFC 7946 specification ensures interoperability
- Geometry Types: Points, LineStrings, Polygons, and their Multi- variants
GeoJSON is the preferred format for exchanging spatial data on the web, making it essential for modern web mapping applications.
GeoJSON Structure
A GeoJSON object can be one of several types:
- FeatureCollection: A collection of Feature objects
- Feature: A single geographic feature with geometry and properties
- Geometry: A geometric shape (Point, LineString, Polygon, etc.)
Example GeoJSON structure:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [105.8342, 21.0278]
},
"properties": {
"name": "Hanoi",
"population": 8000000
}
}
]
}Each feature can have a geometry object defining its shape and location, plus a properties object containing any additional data.
Geometry Types in GeoJSON
GeoJSON supports these geometry types:
- Point: Single location [longitude, latitude]
- LineString: Array of two or more positions forming a line
- Polygon: Array of linear rings (closed LineStrings)
- MultiPoint: Array of Point coordinates
- MultiLineString: Array of LineString coordinate arrays
- MultiPolygon: Array of Polygon coordinate arrays
- GeometryCollection: Array of geometry objects
Note: Coordinates are always in [longitude, latitude] order, which is opposite of the common latitude, longitude order.
Common Uses of GeoJSON
GeoJSON is used in many applications:
- Web Mapping: Display geographic features on interactive maps
- Data Visualization: Choropleth maps, heat maps, marker clusters
- GIS Analysis: Import/export data between different GIS systems
- Location Services: Store and query spatial data in databases
- Open Data: Government and organizations publish geographic datasets
- Mobile Apps: Offline map data and custom overlays
GeoJSON vs Other Formats
Comparison with other geographic formats:
- vs Shapefile: GeoJSON is text-based and web-friendly, Shapefile is binary and requires multiple files
- vs KML: GeoJSON is simpler and faster to parse, KML supports more styling options
- vs GPX: GeoJSON is more flexible for various geometries, GPX is specialized for GPS tracks
- vs TopoJSON: GeoJSON is easier to use, TopoJSON is more compact for large datasets
Choose GeoJSON when you need a simple, widely-supported format for web applications and don't require advanced features like topology encoding.