Skip to content

TopoJSON Minifier

Use this free online TopoJSON minifier to reduce file sizes by optimizing transform precision and removing properties, quickly and easily, without installing any software.

Click the UPLOAD FILES button and select the TopoJSON files you wish to minify. Wait for the processing to finish and download files either individually or grouped together.

All processing happens in your browser—no data is uploaded to any server.

What Is TopoJSON?

TopoJSON is an extension of GeoJSON that encodes topology instead of just geometry. Rather than storing every polygon's coordinates separately (which creates massive duplication for adjacent regions), TopoJSON stores shared boundary arcs once and references them from multiple geometries. This topological encoding typically reduces file size by 80% or more compared to equivalent GeoJSON, making it ideal for web maps with countries, states, counties, or any adjacent polygons.

TopoJSON files use quantized integer coordinates with a transform (scale and translate values) to convert them back to geographic coordinates. This quantization is similar to reducing decimal precision in GeoJSON, but built into the format itself.

Pros of TopoJSON

  • Dramatic file size reduction — Typically 80-95% smaller than equivalent GeoJSON
  • Topology preservation — Shared boundaries stored once, ensuring perfect alignment
  • Efficient rendering — Libraries like D3.js can render TopoJSON directly
  • Better compression — gzip compression works even better on TopoJSON than GeoJSON
  • Ideal for choropleth maps — Perfect for country/state/county boundary visualizations

Cons of TopoJSON

  • Less universal support — Fewer tools support TopoJSON compared to GeoJSON
  • Conversion required — Most web mapping libraries need TopoJSON converted to GeoJSON first
  • More complex structure — Harder to read and manually edit than GeoJSON
  • Not ideal for points — Topology benefits only apply to shared boundaries
  • Limited property access — Properties stored in separate objects, not directly with geometries

Why Minify TopoJSON?

TopoJSON encodes topology using quantized integer coordinates with a transform (scale and translate). Many TopoJSON files carry excessive decimals in the transform values and include bulky properties that aren't needed for visualization. Reducing transform precision and pruning unnecessary properties can shrink file size by 30-60% on top of TopoJSON's inherent compression, while removing whitespace saves additional space.

Optimized TopoJSON files load faster, reduce bandwidth costs, and improve map rendering performance. This tool helps you create leaner topology files by:

  • Transform precision reduction — Adjust scale/translate decimals with visual "grid at Equator" guidance
  • Property filtering — Keep only essential properties, remove unused attributes
  • Batch processing — Upload and process multiple TopoJSON files simultaneously
  • Smart defaults — Automatic optimization with balanced precision settings
  • Preview output — Inspect minified results before downloading
  • Whitespace trimming — Remove all unnecessary formatting
  • 100% client-side — No server uploads, complete privacy

How to Minify TopoJSON

  1. Upload files — Drag and drop multiple .topojson or .json files onto the drop zone, or click "Browse Files"
  2. Review results — Files are instantly minified with default settings
  3. Adjust options (optional) — Change transform precision, select properties to keep/remove
  4. Preview — Click "Preview" to inspect the minified output
  5. Download — Click the download button next to any file to save the optimized version
  6. Clear — Use "Clear All" to remove all files and start fresh

Understanding Transform Precision

TopoJSON's transform contains scale and translate arrays with decimal values. The scale determines the precision of the quantized coordinates. Reducing scale decimals is similar to reducing coordinate precision in GeoJSON—fewer decimals mean larger grid sizes but smaller files.

The "Approx grid at Equator" hint shows how reducing precision affects real-world accuracy, helping you choose the right balance for your use case. For most web maps, the default settings provide excellent quality while maximizing file size reduction.

Batch Processing & Large File Support

This free online tool handles large TopoJSON files efficiently. On modern browsers it can process files over 100MB without freezing. Files are optimized with smart defaults upon upload, giving instant feedback. Adjust settings to reprocess all files, then download individually or preview each result.

When to Use TopoJSON vs GeoJSON

Use TopoJSON when:

  • You have adjacent polygons (countries, states, census tracts, ZIP codes)
  • File size is critical (mobile users, bandwidth limits)
  • You need guaranteed boundary alignment between features
  • Creating choropleth maps or boundary visualizations

Use GeoJSON when:

  • You have point data or non-adjacent features
  • Maximum compatibility is required
  • You need simple, human-readable files
  • Working with tools that don't support TopoJSON