WGS84 to GCJ02 Converter
Convert WGS84 (GPS) coordinates to GCJ02 (Mars coordinates) used by Chinese map services.
Coordinate Conversion
Map View
Compare WGS84 (source) and GCJ02 (target) positions side by side. Maps are synchronized — pan or zoom on either map to compare.
About WGS84 and GCJ02
This tool converts coordinates from the WGS84 coordinate system to the GCJ02 coordinate system. The conversion uses the standard mathematical transformation algorithms widely adopted in GIS and mapping applications.
Default example (Tiananmen Square)
116.397428, 39.909204Click ConvertQuick Facts
- ✓Sub-meter accuracy
- ✓Round-trip precision: 1e-6°
- ✓China coverage (73°E–135°E, 18°N–54°N)
- ✓API access available
API Usage
import requests
response = requests.post(
"https://www.geocoordconv.cc.cd/api/convert",
json={
"lng": 116.397428,
"lat": 39.909204,
"from": "WGS84",
"to": "GCJ02"
}
)
result = response.json()
print(f"Converted: {result['data']['lng']}, {result['data']['lat']}")const response = await fetch("https://www.geocoordconv.cc.cd/api/convert", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
lng: 116.397428,
lat: 39.909204,
from: "WGS84",
to: "GCJ02"
})
});
const result = await response.json();
console.log(`Converted: ${result.data.lng}, ${result.data.lat}`);curl -X POST https://www.geocoordconv.cc.cd/api/convert \
-H "Content-Type: application/json" \
-d '{"lng": 116.397428, "lat": 39.909204, "from": "WGS84", "to": "GCJ02"}'Frequently Asked Questions
How accurate is this conversion?
The conversion achieves sub-meter accuracy for coordinates within China. Round-trip conversion (WGS84 → GCJ02 → WGS84) maintains precision within 1e-6 degrees (approximately 0.1 meters at mid-latitudes).
What if my coordinates are outside China?
The WGS84 → GCJ02 transformation is designed for coordinates within China (73°E–135°E, 18°N–54°N). For coordinates outside this region, the tool will display an "Outside China" warning. The GCJ02 and BD09 offsets are only applied within Chinese territory.
Can I use this tool programmatically?
Yes. Send a POST request to /api/convert with JSON body containing lng, lat, from, and to fields. See code examples above for Python, JavaScript, and cURL.
What are WGS84 and GCJ02 coordinates?
WGS84 and GCJ02 are geographic coordinate systems used in mapping and GIS applications. Each system uses longitude (east-west) and latitude (north-south) measured in decimal degrees. The conversion between them applies specific mathematical offsets defined by their respective standards.