Online Tools Toolshu.com Log In Sign Up

[Online Tool] Fix GPS Coordinate Offset — Convert Between WGS84, GCJ-02, and BD-09 Online

Original Author:bhnw Released on 2026-03-29 12:25 5 views Star (0)

Have you ever taken coordinates from a GPS device or your phone's location, plotted them on Gaode Maps or Baidu Maps, and found the marker sitting several hundred meters — or nearly a kilometer — from where it should be?

Your GPS isn't broken. The map doesn't have a bug. The coordinates are in different systems.

In China, map coordinates are more complicated than most people realize. Toolshu's Satellite Coordinate Converter supports batch conversion between WGS84, GCJ-02 (Mars Coordinates), and BD-09 (Baidu Coordinates). Paste in rows of coordinates, click convert, get results.

🔗 Tool URL: https://toolshu.com/en/laton


Why Do Chinese Map Coordinates Drift?

This is a well-known trap for developers and map users that most everyday users have never heard of.

The global standard coordinate system is WGS84 — the native coordinate system used by GPS satellites. Raw coordinates from a phone's GPS chip are in WGS84. In most countries worldwide, maps also use WGS84, so GPS coordinates and map positions align directly.

In mainland China, however, surveying regulations require that all officially published map products undergo a coordinate offset transformation. The resulting system is GCJ-02, also known as "Mars Coordinates" (火星坐标). Gaode Maps and Tencent Maps both use GCJ-02. The offset is non-linear and varies by location — typically ranging from a few hundred meters to nearly a kilometer.

Baidu Maps applies a second offset on top of GCJ-02, producing BD-09 — a coordinate system used exclusively by Baidu's own services.

All three systems coexist and are mutually incompatible. This is why GPS coordinates plotted directly on a Chinese map appear shifted — and why Gaode coordinates also drift when used on Baidu Maps.


Coordinate System Reference

System Alias Where It's Used
WGS84 GPS coordinates Phone GPS, international maps, Google Maps (outside China)
GCJ-02 Mars Coordinates Gaode Maps, Tencent Maps, Google Maps (China)
BD-09 Baidu Coordinates Baidu Maps and Baidu services

Supported Conversion Directions

Four conversion directions are supported:

  • WGS84 → GCJ-02: Raw GPS coordinates to Gaode / Tencent
  • GCJ-02 → WGS84: Gaode coordinates back to raw GPS (approximate)
  • GCJ-02 → BD-09: Gaode coordinates to Baidu
  • BD-09 → GCJ-02: Baidu coordinates to Gaode

Input format is longitude,latitude — one pair per line. Batch input is supported; processing dozens or hundreds of coordinate pairs at once is no problem.


When Would You Need Coordinate Conversion?

Map development: Displaying POI data on Gaode Maps SDK when the source data was collected as WGS84 by GPS — the coordinates must be converted to GCJ-02 for correct placement. This is the most common development scenario.

Data annotation: Geographic data analysis and machine learning labeling often requires harmonizing coordinates from multiple sources into a single system. Batch conversion is essential.

Location check-in systems: Corporate attendance systems where devices capture WGS84 coordinates but the system validates against Gaode Maps — conversion is required before comparing against geofence boundaries.

Map data migration: Moving from Baidu Maps to Gaode Maps means all existing BD-09 coordinates in the database need bulk conversion to GCJ-02.

Outdoor activity tracks: GPS device track files (GPX format) use WGS84. Before importing into a Chinese map app for display, conversion is needed — otherwise the entire track appears shifted.


How Accurate Is the Conversion?

Because the GCJ-02 offset algorithm has never been publicly disclosed, reverse conversion (GCJ-02 → WGS84) is implemented using iterative approximation — with an error of approximately 0.1 meters, negligible for everyday use.

Forward conversion (WGS84 → GCJ-02) uses the industry-standard algorithm and is fully accurate.

All calculations run locally in your browser — coordinate data is never uploaded to any server. Safe to use with sensitive or restricted coordinates.


👉 Convert your map coordinates now: https://toolshu.com/en/laton

Toolshu Online Tools — toolshu.com — a practical tool for map developers and GIS professionals. Worth bookmarking.

发现周边 发现周边
Comment area

Loading...