Geographic JavaScript Object Notation (.geojson)

IETF Standard

Geographic JavaScript Object Notation (GeoJSON) is the universal, web-native standard for encoding geographic data structures, widely used in modern web mapping (Leaflet, Mapbox, OpenLayers) and GIS applications.

Convert GEOJSON to KML

Free in-browser GEOJSON to KML converter. Convert files instantly on your device.

Inspect & Metadata

Operating systems and file analyzers identify GeoJSON files by inspecting the leading binary byte sequence:

Select or drop files here

100% private in-browser conversion - files never leave your device

or paste Ctrl+V
Zero-Network-Transmission Privacy Guarantee: 0 bytes uploaded to external servers. All processing occurred locally in your browser sandbox.

Byte-Level Header Signature (Magic Bytes)

Operating systems and file analyzers identify GeoJSON files by inspecting the leading binary byte sequence:

HEX SIGNATURE (OFFSET 0):

7B 0A 20 20 22 74 79 70 65 22 3A 20 22 46 65 61 74 75 72 65

ASCII REPRESENTATION: {\n "type": "Feature

Standardization: IETF RFC 7946

Technical Specifications

Container ArchitectureJSON document adhering to RFC 7946 representing geographic Features, FeatureCollections, and Geometries
CompressionUncompressed text (readily compressed over HTTP via Gzip or Brotli)
Byte EndiannessUTF-8 text stream
Color SpacesN/A (Geographic Data)
Channels & StructurePoints, MultiPoints, LineStrings, MultiLineStrings, Polygons, MultiPolygons, GeometryCollections, and custom properties
Max DimensionsWorld Geodetic System 1984 (WGS 84) coordinate space: Longitude (-180 to +180), Latitude (-90 to +90)
TransparencyNone
Streaming & ProgressiveLine-delimited GeoJSON (GeoJSONL / GeoJSONSeq) enables continuous streaming of millions of features

Technical Comparison Matrix: GeoJSON vs Competitors

Technical AttributeGeoJSON (Current)KMLGPXSHP
Web Mapping Adoption100% universal web GIS defaultGoogle Earth defaultGPS device & fitness defaultDesktop GIS legacy standard
Coordinate Order[Longitude, Latitude] (X, Y)Longitude, Latitude, AltitudeLatitude, LongitudeX, Y coordinates
Syntax StyleClean JSON key-valuesVerbose XML tags (<kml>)Verbose XML tags (<gpx>)Multi-file binary (.shp, .shx, .dbf)
Properties SchemaArbitrary JSON properties objectExtendedData schema tagsFixed GPX schema tagsdBase IV (.dbf) fixed columns

Common Corruption Modes & Hex Recovery Guide

Map points appear in the ocean near Antarctica instead of their true location.

Root Cause: Latitude and Longitude values were accidentally swapped in the coordinates array.

Recovery: Swap coordinate positions [lon, lat] using File2File GeoJSON Converter.

Security Analysis & Parser Attack Vectors

GeoJSON properties can contain arbitrary user inputs that must be sanitized before rendering into map popups to prevent XSS.

Known Attack Vectors

  • Cross-site scripting (XSS) via unescaped HTML in GeoJSON feature properties rendered in map tooltips.
  • Denial of service through deeply nested GeometryCollections or million-vertex polygons.
  • Server-Side Request Forgery via remote GeoJSON feature loading.

Defensive Best Practices: Sanitize all property text strings with DOMPurify before inserting into map popup windows.

Historical Origins & Milestones

2016IETF officially standardizes the GeoJSON format as RFC 7946, mandating WGS 84 coordinate reference systems.
2014GitHub introduces native interactive visual map rendering for all .geojson files.
2008Howard Butler, Sean Gillies, and the open-source GIS community publish the initial GeoJSON 1.0 specification.

Key Advantages & Pros

  • Native web standard: maps directly into JavaScript objects in browser mapping libraries (Mapbox GL JS, Leaflet).
  • Human-readable JSON structure allows effortless programmatic creation, filtering, and debugging.
  • Arbitrary property schema: attach any custom metadata (population, name, speed, revenue) directly to geometric shapes.

Technical Limitations & Cons

  • Text verbosity: stores floating-point coordinates as repeated ASCII digits, leading to larger file sizes than binary Shapefiles or FlatGeobuf.
  • RFC 7946 strictly mandates [Longitude, Latitude] order, which frequently confuses developers accustomed to 'Lat/Long'.
  • Large polygons with millions of vertices can cause web browser DOM rendering slowdowns.

Interesting Technical Trivia

  • The official GeoJSON standard orders coordinates as [Longitude, Latitude] (X, Y Cartesian order), which is the exact opposite of how people speak ('Latitude, Longitude').
  • If you commit a .geojson file to GitHub, GitHub automatically renders it as an interactive, clickable map.
  • RFC 7946 mandates that polygon boundary rings must follow the 'right-hand rule': exterior rings must be wound counter-clockwise.

Frequently Asked Technical Questions

Why are my GeoJSON coordinates ordered [longitude, latitude] instead of [latitude, longitude]?

Because in mathematics and computer graphics, coordinates are always specified as (X, Y). Longitude represents the horizontal X-axis, and Latitude represents the vertical Y-axis.

How can I convert KML or Shapefile to GeoJSON?

You can convert Google Earth KML files or Esri Shapefiles into clean, web-ready GeoJSON in seconds using File2File.app directly in your browser.

What is the difference between GeoJSON and Shapefile?

Shapefile is an obsolete multi-file binary format from the 1990s (.shp, .shx, .dbf). GeoJSON is a modern, single-file open web format written in clean JSON.