Skip to content
UniKit

Coordinate converter

Convert between WGS84 (GPS), GCJ02 and BD09 (Baidu) coordinates, plus decimal degrees ↔ degrees/minutes/seconds (DMS). Fully offline.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

HemisphereE / N
Result
116.410244, 39.916404
DMS116°24′36.9″E 39°54′59.1″N
Offset distance555.0 m
All three systems
WGS84 (raw GPS)116.404000, 39.915000 · 116°24′14.4″E 39°54′54.0″N
GCJ02 (Mars, AMap/Tencent)116.410244, 39.916404 · 116°24′36.9″E 39°54′59.1″N
BD09 (Baidu)116.416627, 39.922700 · 116°24′59.9″E 39°55′21.7″N

What this tool does

  • When a phone GPS reading, AMap and Baidu disagree, convert between the three systems instead of placing a marker hundreds of metres off.
  • Turn decimal degrees into DMS (116.404 → 116°24′14.4″E) or convert a DMS coordinate copied off a map into the decimal value your code expects.
  • Verify the result at a glance: the tool lists all three systems side by side and reports how far the conversion moved the point.
  • Foreign coordinates are left alone — GCJ02 and BD09 only apply their offset inside China, so points abroad come back unchanged.

Example

Input

WGS84 longitude 116.404, latitude 39.915

Output

GCJ02: 116.410244, 39.916404 (in DMS 116°24′36.9″E / 39°54′59.1″N); offset distance about 554.98 m; BD09: 116.416627, 39.922700

The offset is not a constant — it varies with position by design of the encryption itself. GCJ02 → WGS84 is solved iteratively to better than 1e-9 degrees, so a round trip lands back on the original value.

Frequently asked questions

What are GCJ02 and BD09, and why convert at all?

GCJ02 (the "Mars" coordinate system) is a non-linear offset applied to WGS84 by Chinese surveying authorities and is what AMap, Tencent and most domestic maps use. BD09 is Baidu’s further polar offset on top of GCJ02. That is why the same place shows coordinates hundreds of metres apart across platforms, and mixing them shifts your markers.

How accurate is the reverse conversion (GCJ02 → WGS84)?

There is no closed-form inverse, so the tool iterates: it offsets a candidate point forward and compares it with the known value until the difference drops below 1e-9 degrees. The error ends up in the centimetre range, though residual truncation from the algorithm itself remains compared with a true GPS fix.

Are foreign coordinates offset?

No. The tool first checks a rough bounding box for China (about 73.66–135.05°E and 3.86–53.55°N) and returns anything outside it unchanged. Being a rectangle, that test can be off by a hair near the border.

How do decimal degrees and DMS relate?

One degree is 60 minutes or 3600 seconds, so 116.404° is 116° 24.24′ or 116°24′14.4″. The tool keeps fractional seconds (one digit by default) and handles carry automatically — 59.96″ rolls over into 00.0″ of the next degree.

What happens with invalid input?

Longitude must be between -180 and 180 and latitude between -90 and 90; empty or non-numeric input reports an invalid coordinate. When converting to DMS the minutes and seconds must stay below 60, otherwise you get an error rather than a silently wrong value.

Keywords:coordinatecoordinateswgs84gcj02bd09经纬度坐标转换火星坐标百度坐标dms度分秒gps

Related tools