ToolsBlog

How to Open a GeoJSON File (and What It Is)

Try it free:GeoJSON ViewerKML to GeoJSON ConverterShapefile Viewer

Table of Contents

  • What is a GeoJSON file?
  • Option 1: view it on a map in your browser
  • Option 2: a text editor, to read the raw data
  • Option 3: QGIS, for full GIS work
  • Option 4: Python with GeoPandas
  • Option 5: GitHub and other quick previews
  • When the map is empty or in the wrong place
  • Converting other map formats to GeoJSON
  • FAQ
  • What program opens a GeoJSON file?
  • Is GeoJSON the same as JSON?
  • Can I open a GeoJSON file in Excel?
  • What is the difference between GeoJSON and a shapefile?
  • Why does GeoJSON use longitude before latitude?

A .geojson file holds map data: points, lines and shapes, each with a set of attributes. City open-data portals, mapping APIs and GIS programs all export it because it is plain text that any programming language can read.

You can open it in a text editor, but you will just see coordinates. To see the data as a map you need a viewer. This guide explains how the format works and shows several ways to open it, from a browser tab to Python.

What is a GeoJSON file? #

GeoJSON is a JSON format for geographic features, standardized in 2016 as RFC 7946. A typical file is a FeatureCollection, a list of features. Each Feature has a geometry (where it is) and properties (what it is):

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [-122.4194, 37.7749] },
      "properties": { "name": "San Francisco", "population": 808437 }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [-122.4194, 37.7749],
          [-118.2437, 34.0522]
        ]
      },
      "properties": { "name": "SF to LA" }
    }
  ]
}

The geometry types are Point, LineString and Polygon, their multi-part versions MultiPoint, MultiLineString and MultiPolygon, and GeometryCollection.

Two rules matter in practice:

  • Coordinates are longitude first, then latitude. [-122.4194, 37.7749] is San Francisco. This is the opposite of how most people write coordinates, and the most common source of broken files.
  • Coordinates are in WGS 84 degrees, the same system GPS uses. Older files written before RFC 7946 sometimes use a crs member and projected coordinates in meters instead.

The file extension is usually .geojson, sometimes .json.

Option 1: view it on a map in your browser #

The GeoJSON Viewer draws the file on an interactive map. The file is parsed in your browser, so the data is not uploaded.

  1. Open the GeoJSON Viewer and drop your .geojson or .json file on it.
  2. The map zooms to your features. Pan and zoom to explore.
  3. Click any point, line or polygon to see its properties.
  4. Export the data as GeoJSON again when you are done.

It accepts a FeatureCollection, a single Feature, a bare geometry, and newline-delimited GeoJSON sequences. If some entries are invalid, it skips them and tells you which ones, instead of refusing the whole file.

Option 2: a text editor, to read the raw data #

Because GeoJSON is JSON, any text editor opens it. VS Code, Sublime Text or Notepad++ can format and fold it, which is handy for checking property names or finding one feature. For a quick summary on the command line, jq works well:

jq '.features | length' places.geojson          # how many features
jq '.features[0].properties' places.geojson     # attributes of the first one

Option 3: QGIS, for full GIS work #

QGIS is the free, open-source desktop GIS for Windows, macOS and Linux. Drag the .geojson file into the window, or use Layer > Add Layer > Add Vector Layer. Open the attribute table to see the properties as rows. QGIS can also style the layer, combine it with other data, reproject it and save it to other formats such as GeoPackage or shapefile.

Option 4: Python with GeoPandas #

GeoPandas reads GeoJSON into a table with a geometry column:

pip install geopandas
import geopandas as gpd

gdf = gpd.read_file("places.geojson")
print(gdf.head())       # properties plus a geometry column
print(gdf.crs)          # EPSG:4326 for standard GeoJSON

# Just the attributes, as a CSV
gdf.drop(columns="geometry").to_csv("places.csv", index=False)

If you prefer SQL, DuckDB's spatial extension reads the same file:

INSTALL spatial;
LOAD spatial;
SELECT name, ST_GeometryType(geom) AS type FROM ST_Read('places.geojson');

Option 5: GitHub and other quick previews #

If the file is in a GitHub repository, GitHub renders .geojson files as a map when you open them. The free web editor geojson.io also opens and edits small files.

When the map is empty or in the wrong place #

  • Everything sits in the ocean or the wrong country. Longitude and latitude are swapped. Paris is [2.35, 48.86]; written as [48.86, 2.35] it lands in the Indian Ocean off Somalia. For places in the Americas the swapped latitude is outside -90 to 90, so viewers may drop the features entirely. The fix is to swap the two numbers in every coordinate pair, which QGIS and GeoPandas can do for a whole layer.

  • Nothing appears, and the coordinates are large numbers like -13627361. The file uses a projected system in meters, such as Web Mercator, not degrees. Reproject it to WGS 84. In GeoPandas, assuming the source is Web Mercator (EPSG:3857):

    gdf = gpd.read_file("projected.geojson")
    gdf.set_crs(3857, allow_override=True).to_crs(4326).to_file("fixed.geojson", driver="GeoJSON")
    
  • "Invalid JSON". The file is cut off or has a stray character. Text editors with JSON support point to the exact line.

  • The file is huge and slow. GeoJSON repeats property names for every feature and stores coordinates as text, so files get large quickly. Simplify geometries in QGIS or Mapshaper, or store large datasets as GeoPackage or GeoParquet and export GeoJSON only for the web.

Converting other map formats to GeoJSON #

GeoJSON is the common format most web maps expect, so it is often the target of a conversion:

  • KML (Google Earth): the KML to GeoJSON converter converts Point, LineString and Polygon placemarks, with names, descriptions and simple ExtendedData values, and previews the result on a map. To go back to Google Earth, use the GeoJSON to KML converter.
  • Shapefiles: the Shapefile Viewer opens a .zip containing the .shp, .dbf, .shx and .prj files and exports GeoJSON. The Shapefile to GeoJSON converter does the conversion directly.
  • GPX (GPS tracks): use the GPX to GeoJSON converter.

FAQ #

What program opens a GeoJSON file? #

Any text editor shows the raw JSON. To see it on a map, use the GeoJSON Viewer in your browser, QGIS on the desktop, or GeoPandas in Python.

Is GeoJSON the same as JSON? #

GeoJSON is JSON with a fixed structure for geographic data. Every GeoJSON file is valid JSON, but not every JSON file is GeoJSON.

Can I open a GeoJSON file in Excel? #

Not as a map. Excel can import JSON with Power Query, but the geometry ends up as nested lists. To get the attributes as a table, export them to CSV with GeoPandas as shown above, or with QGIS (Export > Save Features As > CSV).

What is the difference between GeoJSON and a shapefile? #

A shapefile is a set of several files (.shp, .dbf, .shx, .prj) in a binary format from Esri. GeoJSON is a single text file. Shapefiles are common in desktop GIS; GeoJSON is the default for web maps. The Shapefile Viewer opens a shapefile and exports it as GeoJSON.

Why does GeoJSON use longitude before latitude? #

It follows the x, y order of math and most GIS software, where x is east-west (longitude) and y is north-south (latitude). RFC 7946 makes this order mandatory.

Try the tools from this post

Free and private: your files stay in your browser.

  • GeoJSON ViewerView GeoJSON files, validate map features, and continue GIS workflows.
  • KML to GeoJSON ConverterConvert Google Earth KML placemarks to GeoJSON and preview them on a map.
  • Shapefile ViewerView ESRI shapefiles, inspect attributes, and export to GeoJSON.

Related posts

New GeoJSON and Shapefile Viewer

Easily preview, explore, and share GeoJSON and Shapefile data right in your browser—no installs or sign‑ups needed.

2025-05-01

How to Open a .csv.gz File

A .csv.gz file is a CSV compressed with gzip. Here is how to view it in your browser, decompress it on Windows, macOS or Linux, or read it directly with Python or DuckDB.

2026-11-18

How to Open an XLSX File Without Excel

No Excel license? Open an .xlsx file for free in your browser, Google Sheets, Excel for the web, LibreOffice, Apple Numbers or Python, and turn a sheet into CSV.

2026-11-18

ChatDB

Free, browser-side data tools. No uploads, no accounts.

Data tools

Reader

  • Online CSV Viewer
  • Parquet Viewer & Reader
  • Excel Viewer and Editor
  • SQLite Viewer
  • Gzip CSV Reader
  • CSV Size Analyzer
  • Parquet Schema Reader
  • Parquet Metadata Reader
  • Data Profiler
  • Image Measure
  • Shapefile Viewer
  • GeoJSON Viewer

Editor

  • CSV Viewer and Editor
  • Excel Viewer and Editor
  • Online Excel Editor
  • CSV Splitter
  • Markdown Editor
  • Image Cropper
  • SVG Editor
  • Screenshot Background Creator
  • Document Scanner
  • Audio Clipper
  • Video Trim & Crop Tool

Converter

  • CSV to Gzip Converter
  • CSV to Parquet Converter
  • Excel to CSV Converter
  • Parquet to CSV Converter
  • JSON to Parquet Converter
  • Parquet to JSON Converter
  • CSV Decompressor
  • CSV to JSON Converter
  • CSV to Markdown Table
  • Image Converter
  • KML to GeoJSON Converter
  • GPX to GeoJSON Converter
  • GeoJSON to KML Converter
  • Shapefile to GeoJSON Converter

Formatter

  • CSV Encoder
  • SQL Formatter
  • JSON Formatter
  • XML Formatter
  • YAML Formatter
  • Dataset README Generator
  • URL Encoder & Decoder
  • Regex Tester

Compressor

  • CSV Compressor
  • CSV to Gzip Converter
  • CSV Decompressor
  • Image Compressor

AI

  • Parquet AI
  • CSV AI
  • Color Palette Generator
  • Extract Image Colors

GIS

  • Lat/Lng Point Finder
  • KML to GeoJSON Converter
  • GPX to GeoJSON Converter
  • GeoJSON to KML Converter
  • Shapefile to GeoJSON Converter
  • Shapefile Viewer
  • GeoJSON Viewer

Image tools

Convert To

  • Convert to JPEG
  • Convert to PNG
  • Convert to WEBP
  • Convert to GIF
  • Convert to BMP
  • Convert to TIFF
  • Convert to ICO
  • Convert to AVIF
  • Convert to FF
  • Convert to HDR
  • Convert to EXR
  • Convert to QOI
  • Convert to TGA
  • Convert to PNM

Edit

  • Image Cropper
  • SVG Editor
  • Screenshot Background Creator
  • Document Scanner

Compress

  • Compress JPG
  • Compress JPEG
  • Compress PNG
  • Compress WEBP
  • Compress GIF

Company

  • All tools
  • Blog
  • Privacy Policy
  • Terms of Service

© 2026 ChatDB. All rights reserved.

v2.4.1