Skip to content
🛠️ToolsShed

GPS Coordinate Converter

Convert GPS coordinates between Decimal Degrees (DD), Degrees Minutes Seconds (DMS), and Degrees Decimal Minutes (DDM).

About this tool

GPS coordinates can be expressed in multiple formats, and understanding how to convert between them is essential for navigation, mapping, surveying, and outdoor activities. This GPS Coordinate Converter transforms coordinates seamlessly between Decimal Degrees (DD), Degrees Minutes Seconds (DMS), and Degrees Decimal Minutes (DDM)—the three most widely used formats in modern technology and traditional cartography. Whether you're working with GPS devices, mobile apps, mapping software, or paper maps, this tool ensures compatibility across different systems and standards.

To use the converter, simply paste or type your coordinates in any supported format and select the format you're starting from. The tool automatically recognizes the structure of your input and displays the equivalent coordinates in all three formats simultaneously. This eliminates the need for manual calculations or switching between multiple tools, making it invaluable for pilots, surveyors, hikers, researchers, and anyone who regularly works with location data from diverse sources.

The converter operates entirely in your browser with no server uploads, ensuring your coordinates remain private. It handles both positive and negative values (representing hemispheres: North/South for latitude, East/West for longitude) and maintains precision across conversions. Whether you're decoding coordinates from a vintage Garmin receiver, converting data for GIS software, or sharing location information in a format your team understands, this tool bridges the gap between different notation systems instantly.

Frequently Asked Questions

Code Implementation

def dd_to_dms(decimal_deg: float, is_lat: bool) -> str:
    """Convert decimal degrees to DMS string."""
    direction = ("N" if decimal_deg >= 0 else "S") if is_lat else ("E" if decimal_deg >= 0 else "W")
    abs_deg = abs(decimal_deg)
    degrees = int(abs_deg)
    minutes_full = (abs_deg - degrees) * 60
    minutes = int(minutes_full)
    seconds = (minutes_full - minutes) * 60
    return f"{degrees}° {minutes}' {seconds:.4f}" {direction}"

def dd_to_ddm(decimal_deg: float, is_lat: bool) -> str:
    """Convert decimal degrees to DDM string."""
    direction = ("N" if decimal_deg >= 0 else "S") if is_lat else ("E" if decimal_deg >= 0 else "W")
    abs_deg = abs(decimal_deg)
    degrees = int(abs_deg)
    minutes = (abs_deg - degrees) * 60
    return f"{degrees}° {minutes:.6f}' {direction}"

def dms_to_dd(degrees: float, minutes: float, seconds: float, direction: str) -> float:
    """Convert DMS to decimal degrees."""
    dd = degrees + minutes / 60 + seconds / 3600
    if direction in ("S", "W"):
        dd = -dd
    return dd

# New York City coordinates
lat, lon = 40.712776, -74.005974
print(f"DD:  {lat}, {lon}")
print(f"DMS: {dd_to_dms(lat, True)}, {dd_to_dms(lon, False)}")
print(f"DDM: {dd_to_ddm(lat, True)}, {dd_to_ddm(lon, False)}")

# Convert back
lat_back = dms_to_dd(40, 42, 45.9936, "N")
print(f"Back to DD: {lat_back:.6f}")  # 40.712776

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.