WGS84 to GCJ-02 Converter
About WGS84 Coordinate System
WGS84 (World Geodetic System 1984) is the global standard geodetic reference system used by GPS. It defines an Earth-centered, Earth-fixed coordinate system and geodetic datum.
Developed by the U.S. Department of Defense in 1984, WGS84 has undergone several refinements (WGS84(G730), WGS84(G873), WGS84(G1150), WGS84(G1762)) to improve accuracy through GPS satellite observations.
WGS84 is the default coordinate system for GPS receivers worldwide. It is used in aviation, maritime navigation, Google Maps, OpenStreetMap, GIS applications, and scientific research.
WGS84 is the native coordinate system of the Global Positioning System (GPS), ensuring direct compatibility with all GPS receivers and satellite navigation systems worldwide.
As the most widely adopted geodetic datum, WGS84 provides a consistent global reference frame for mapping, surveying, and geospatial data exchange across international boundaries.
With continuous refinements, WGS84 achieves centimeter-level accuracy globally, making it suitable for high-precision applications like surveying, drone navigation, and scientific research.
About GCJ-02 Coordinate System
GCJ-02 (Mars Coordinate System) is a geodetic datum used in China for geospatial data. It applies an encrypted offset to WGS84 coordinates to comply with national regulations.
Developed by the Chinese National Bureau of Surveying and Mapping, GCJ-02 was introduced to implement the national security policy on geospatial information. Most Chinese map services use this system.
GCJ-02 is used by all Chinese government-approved map services including AMap (Gaode), Tencent Maps, and Apple Maps in China. It is required for any mapping application operating within mainland China.
GCJ-02 applies a non-linear offset algorithm to WGS84 coordinates, shifting positions by up to several hundred meters. The exact algorithm is classified by the Chinese government.
The encryption offset only applies within mainland China. Coordinates outside China pass through without modification.
GCJ-02 is the mandatory coordinate system for all commercial map services operating in China. Converting between WGS84 and GCJ-02 is essential for international data integration.
WGS84 → GCJ-02 Conversion Guide
// WGS84 → GCJ-02 transformation
dLat = transformLat(lon - 105.0, lat - 35.0)
dLon = transformLon(lon - 105.0, lat - 35.0)
radLat = lat × π / 180
magic = 1 - 0.00669342162296594323 × sin²(radLat)
sqrtMagic = √magic
dLat = (dLat × 180) / ((6335552.717 / (magic × sqrtMagic)) × π)
dLon = (dLon × 180) / ((6378245.0 / sqrtMagic × cos(radLat)) × π)
gcjLat = lat + dLat
gcjLon = lon + dLonThe GCJ-02 (Mars Coordinate) encryption applies a non-linear offset to WGS84 coordinates. The offset function uses multiple sinusoidal terms computed from the coordinate position, creating a smooth but non-reversible shift. This transformation is applied only within China's boundaries.
- Enter your WGS84 coordinates in latitude,longitude format (one pair per line)
- The system automatically converts from WGS84 to GCJ-02 using the standard offset algorithm
- Verify the output coordinates are within the expected range for your target map service
- Copy or download the converted coordinates for use in your application
- GCJ-02 conversion only applies within China's boundaries (latitude 3.86-53.55°N, longitude 73.66-135.05°E)
- The offset algorithm is consistent across all implementations, so results are reproducible
- Use batch conversion for multiple coordinates to save time