TopoJSON to GeoJSON Converter

Decode TopoJSON back to GeoJSON for tools that don't support TopoJSON

Reconstruct GeoJSON geometries from a TopoJSON topology in your browser — reversing delta encoding, applying the transform, and stitching arcs back into rings and lines. Handles multi-object topologies with object selection. No server required. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How does decoding work?

Each arc in the topology is stored delta-encoded: the first point is absolute and the rest are offsets. The decoder runs a cumulative sum to rebuild absolute integer coordinates, then applies the topology transform (scale and translate) to recover real longitude and latitude.

TopoJSON to GeoJSON Converter reverses TopoJSON encoding so you can use the data in the many tools that only read plain GeoJSON. It rebuilds each geometry by stitching together the topology’s shared arcs, undoing the delta encoding, and applying the transform to restore real-world coordinates — entirely in your browser with nothing uploaded.

How it works

A TopoJSON topology stores all line segments once in a global arcs array and references them by index from each geometry. Decoding reverses three encoding steps:

  1. Un-delta. Each arc lists its first point absolutely and every subsequent point as an offset from the previous one. The decoder accumulates these offsets to recover absolute integer coordinates.
  2. Transform. If the topology has a transform, each integer point p becomes point = p * scale + translate, converting the quantized grid back to longitude and latitude.
  3. Arc stitching. A geometry’s arcs are arrays of arc indices. A positive index i uses arc i forwards; a negative index uses arc ~i (which is -i - 1) reversed. The decoder concatenates the arcs, dropping the duplicated shared vertex where one arc ends and the next begins.

Why TopoJSON exists and when to convert back

TopoJSON was designed by Mike Bostock (the creator of D3.js) to solve a specific problem with GeoJSON: when two adjacent countries share a border, a plain GeoJSON file stores that border twice — once in each country’s polygon. TopoJSON encodes the shared arc once and references it from both geometries, which reduces file size substantially for administrative boundary data. A typical world countries file is considerably smaller as TopoJSON than as GeoJSON.

The trade-off is compatibility. Most GIS tools, mapping libraries, and data pipelines understand GeoJSON natively. Tools that only support TopoJSON are the exception, not the rule. Converting back to GeoJSON is necessary when:

  • Loading data into QGIS, ArcGIS, or other desktop GIS software
  • Feeding boundaries into a PostGIS database
  • Using Mapbox GL JS or Leaflet without a TopoJSON plugin
  • Sharing data with colleagues who expect standard GeoJSON
  • Passing geometries to a spatial analysis API

Handling multi-object topologies

A single TopoJSON file often encodes multiple named layers — for example, a US atlas file might have counties, states, and nation as separate objects in the same topology, all sharing the same arc pool. The dropdown in this tool lets you select which object to decode, converting just that layer to a GeoJSON FeatureCollection while leaving the other layers in the topology unchanged.

If you need all objects decoded, run the tool once per object and combine the resulting FeatureCollections in your pipeline.

Tips and notes

  • Polygons in TopoJSON are arrays of rings, and MultiPolygons are arrays of those — the decoder rebuilds the full nesting so the output matches the GeoJSON spec.
  • Properties attached to each topology geometry are copied onto the resulting GeoJSON feature, so attributes like country names, FIPS codes, and population figures carry through correctly.
  • If the topology lacks a transform (meaning coordinates are already in longitude/latitude), the decoder skips dequantization and uses the arc values directly — valid per the TopoJSON specification.
  • Use the companion GeoJSON to TopoJSON tool to compress data when you want smaller file sizes, and this tool to decode it back whenever downstream tooling needs GeoJSON format.