Blog / 7 min read

Converting Between WGS84 and UTM: A Practical Guide

Learn how to convert coordinates between WGS84 (latitude/longitude) and UTM (Universal Transverse Mercator). Understand zone selection, conversion formulas, and common pitfalls.

coordinates wgs84 utm conversion tutorial
Table of Contents

Converting between WGS84 geographic coordinates (latitude/longitude) and UTM projected coordinates is one of the most common tasks in geospatial work. Whether you’re working with GPS data, preparing maps, or performing spatial analysis, understanding this conversion is essential.

Understanding the Two Systems

WGS84 (EPSG:4326)

WGS84 (World Geodetic System 1984) is a geographic coordinate system that describes positions on Earth’s surface using:

  • Latitude: Angular distance north or south of the equator (-90° to +90°)
  • Longitude: Angular distance east or west of the Prime Meridian (-180° to +180°)

WGS84 is the coordinate system used by GPS satellites. When your phone shows coordinates like 37.7749° N, 122.4194° W, that’s WGS84.

Key characteristics:

  • Units are degrees (angular measurement)
  • Global coverage—works anywhere on Earth
  • One degree of longitude varies in distance based on latitude
  • Not suitable for direct distance or area calculations

UTM (Universal Transverse Mercator)

UTM is a projected coordinate system that divides Earth into 60 vertical zones, each 6° of longitude wide. Within each zone, positions are expressed as:

  • Easting: Distance in meters east from the zone’s central meridian (offset by 500,000m)
  • Northing: Distance in meters north from the equator (offset by 10,000,000m in southern hemisphere)

Key characteristics:

  • Units are meters (linear measurement)
  • Limited to one zone at a time
  • Excellent for local measurements and calculations
  • Minimal distortion within each zone

Why Convert Between Them?

Use CaseStart WithConvert ToReason
GPS data analysisWGS84UTMCalculate accurate distances and areas
Survey data for web mapsUTMWGS84Display on Google Maps, Leaflet, etc.
CAD to GIS integrationUTMWGS84Share data in universal format
Field data collectionWGS84UTMWork in local coordinate system

UTM Zone Determination

Before converting WGS84 to UTM, you must determine the correct UTM zone. Each zone is numbered 1-60, starting at 180°W and moving east.

Zone Calculation Formula

Zone Number = floor((Longitude + 180) / 6) + 1

Examples

LocationLongitudeUTM Zone
New York-74.0060°18
London-0.1276°30
Tokyo139.6917°54
Sydney151.2093°56
San Francisco-122.4194°10

Zone Exceptions

Norway and Svalbard have special zone widths to avoid splitting populated areas:

  • Zone 32 is extended to cover southwestern Norway
  • Zones 33 and 35 are used for Svalbard instead of 32 and 34

EPSG Codes for UTM Zones

UTM zones have standardized EPSG codes:

  • Northern Hemisphere: 326XX (e.g., Zone 10N = EPSG:32610)
  • Southern Hemisphere: 327XX (e.g., Zone 56S = EPSG:32756)

The Conversion Process

WGS84 to UTM

The conversion from geographic to projected coordinates involves complex mathematics, including:

  1. Datum parameters: WGS84 ellipsoid semi-major axis (6,378,137 m) and flattening
  2. Projection parameters: Central meridian, scale factor (0.9996), false easting/northing
  3. Transverse Mercator formulas: Series expansions for the projection

Here’s a simplified overview:

Input: Latitude (φ), Longitude (λ)

1. Determine UTM zone from longitude
2. Calculate central meridian: CM = (Zone - 1) × 6 - 180 + 3
3. Apply Transverse Mercator projection equations
4. Add false easting (500,000 m) and false northing (0 or 10,000,000 m)

Output: Easting (E), Northing (N), Zone

UTM to WGS84

The reverse conversion (UTM to WGS84) requires:

  1. Zone information: Must know the UTM zone number and hemisphere
  2. Inverse projection: Reverse the Transverse Mercator equations
  3. Iterative calculation: Some formulas require iteration to converge
Input: Easting (E), Northing (N), Zone, Hemisphere

1. Calculate central meridian from zone
2. Remove false easting/northing
3. Apply inverse Transverse Mercator equations

Output: Latitude (φ), Longitude (λ)

Practical Example

Let’s convert the coordinates of the Statue of Liberty:

WGS84 Input

Latitude:  40.6892° N
Longitude: 74.0445° W (-74.0445°)

Step 1: Determine UTM Zone

Zone = floor((-74.0445 + 180) / 6) + 1
Zone = floor(105.9555 / 6) + 1
Zone = 17 + 1 = 18

Step 2: Convert to UTM Zone 18N

Easting:  583,323 m
Northing: 4,507,348 m
Zone:     18N
EPSG:     32618

Verification

You can verify this conversion using our Point Coordinate Converter. Enter the WGS84 coordinates and convert to EPSG:32618 (UTM Zone 18N).

Common Pitfalls

1. Wrong Zone Selection

Using the wrong UTM zone produces incorrect coordinates. Always verify the zone matches your data’s location.

Example Error:

  • Correct: San Francisco in Zone 10 → Easting ~551,000
  • Wrong: San Francisco in Zone 11 → Easting ~-61,000 (negative, indicating wrong zone)

2. Hemisphere Confusion

Northern and southern hemisphere UTM coordinates look similar but use different EPSG codes and false northing values.

HemisphereFalse NorthingEPSG Pattern
Northern0 m326XX
Southern10,000,000 m327XX

Tip: If your northing value is greater than 10,000,000, you’re likely in the southern hemisphere.

3. Coordinate Order Confusion

Different systems expect different orders:

FormatOrderExample
WGS84 (common)Latitude, Longitude40.6892, -74.0445
GeoJSONLongitude, Latitude[-74.0445, 40.6892]
UTMEasting, Northing583323, 4507348

4. Crossing Zone Boundaries

When your data spans multiple UTM zones:

  • Convert each point to its correct zone, or
  • Use a single zone for the entire dataset (accepting some distortion at edges), or
  • Use a different projection (like State Plane or a custom Transverse Mercator)

5. Precision Loss

Each conversion introduces small rounding errors. For high-precision applications:

  • Minimize round-trips between systems
  • Use double-precision floating point throughout
  • Store original coordinates alongside converted values

Conversion in Code

Using Proj4js (JavaScript)

import proj4 from 'proj4';

// Define coordinate systems
const wgs84 = 'EPSG:4326';
const utm18n = '+proj=utm +zone=18 +datum=WGS84 +units=m +no_defs';

// WGS84 to UTM
const [easting, northing] = proj4(wgs84, utm18n, [-74.0445, 40.6892]);
console.log(`UTM: ${easting}, ${northing}`);

// UTM to WGS84
const [lon, lat] = proj4(utm18n, wgs84, [583323, 4507348]);
console.log(`WGS84: ${lat}, ${lon}`);

Using Python (pyproj)

from pyproj import Transformer

# Create transformer
wgs84_to_utm = Transformer.from_crs("EPSG:4326", "EPSG:32618", always_xy=True)
utm_to_wgs84 = Transformer.from_crs("EPSG:32618", "EPSG:4326", always_xy=True)

# WGS84 to UTM
easting, northing = wgs84_to_utm.transform(-74.0445, 40.6892)
print(f"UTM: {easting:.2f}, {northing:.2f}")

# UTM to WGS84
lon, lat = utm_to_wgs84.transform(583323, 4507348)
print(f"WGS84: {lat:.6f}, {lon:.6f}")

Online Tools

For quick conversions without writing code:

Summary

AspectWGS84UTM
TypeGeographicProjected
UnitsDegreesMeters
CoverageGlobalPer zone (6° wide)
Best forStorage, exchangeMeasurements, analysis
EPSG Code4326326XX (N) / 327XX (S)

Key takeaways:

  1. Always identify the correct UTM zone before converting
  2. Mind the hemisphere—it affects EPSG codes and false northing
  3. Watch for coordinate order differences between systems
  4. Use established libraries (Proj4js, pyproj) for accurate conversions
  5. For datasets spanning multiple zones, consider alternative projections

Understanding WGS84 to UTM conversion opens up accurate spatial analysis while maintaining compatibility with GPS devices and web mapping platforms. With the right tools and awareness of common pitfalls, you can confidently work with both coordinate systems.