Skip to main content
HomeBlogHow to Convert Lat/Long to Geo Link
DEVELOPER & MAPPING GUIDE

How to Convert Latitude/Longitude to a Geo Link — geo: URI, Google Maps & More

GPS coordinates alone aren't shareable. This guide covers every method to turn raw latitude/longitude into a tappable map link — from a single browser click to production-ready code for geo: URIs, Google Maps, Apple Maps, and DMS conversion.

geo: URIGoogle MapsDMS ConversionJavaScriptNo-Code

In This Guide

  1. 1Why raw coordinates need to become links
  2. 2Understanding the geo: URI standard
  3. 3Method 1 — Convert coordinates online (no code)
  4. 4Method 2 — Build map links manually with JavaScript
  5. 5Method 3 — Converting DMS to decimal degrees
  6. 6Method 4 — Choosing the right link for each platform
  7. 7Embedding a live map preview
  8. 8Common mistakes and how to avoid them
  9. 9Frequently asked questions

Why Raw Coordinates Need to Become Links

A pair of numbers like 40.7128, -74.0060 means nothing to most people at a glance, and it can't be tapped on a phone. GPS devices, survey exports, delivery systems, and APIs all speak in raw decimal or DMS coordinates — but the person receiving that data usually just wants to tap something and see the location open in their maps app.

Converting coordinates into a proper link closes that gap. It also solves a second problem: different platforms (Google Maps, Apple Maps, Bing, OpenStreetMap) each use their own URL format, so "the right link" depends on who's opening it.

Example — raw coordinates vs. a usable link
Raw: 40.7128, -74.0060
Link: https://www.google.com/maps?q=40.7128,-74.0060&z=15

You'll run into this exact conversion need across delivery coordination, field survey reporting, real estate listings, and any app feature that shows "open in maps."

Understanding the geo: URI Standard

The geo: URI scheme is defined in RFC 5870 and looks like geo:40.7128,-74.0060. It is the only link format that doesn't hard-code a specific maps provider — mobile operating systems intercept it and let the user pick whichever maps app is installed and preferred.

Standard
RFC 5870

An official IETF specification, not a proprietary format owned by any single company.

Platform
Provider-Neutral

The OS resolves which maps app should open it — not the link itself.

Best For
Mobile Apps

Android intents and iOS universal links both recognize the scheme natively.

Optional parameters extend the base format — a zoom level via ?z=15, or a search label via ?q=. Not every desktop browser resolves geo: links, which is why platform-specific links (covered in Method 4) still matter for cross-device sharing.

Method 1 — Convert Coordinates Online (No Code Required)

For a one-off conversion — sharing a delivery point, checking a coordinate from a spreadsheet, or verifying a GPS export — the fastest method is a dedicated browser tool. No setup, and it handles decimal, separate-field, and DMS input equally well.

QuickTextTools — Lat/Long to Geo Link Converter

Enter coordinates in whichever format you have them, click Generate, and instantly get a geo: URI plus Google Maps, Apple Maps, Bing Maps, and OpenStreetMap links — along with a live embedded map preview to verify the pin.

Open Lat/Long to Geo Link Tool
1

Choose the input mode that matches your data — Combined, Lat/Long, or DMS Format

2

Paste or enter your coordinates into the corresponding fields

3

Optionally add a label name and adjust the default zoom level

4

Click Generate Geo Link to validate the coordinates and build every link format

5

Copy the link you need, open it directly, or check the pin on the live map preview

Method 2 — Build Map Links Manually With JavaScript

If you're building a feature that generates these links dynamically — say, a "share location" button — you can construct each URL directly from a lat/lng pair.

javascript — generate map links from coordinates
function buildMapLinks(lat, lng, zoom = 15, label = "") {
  const latStr = lat.toFixed(6);
  const lngStr = lng.toFixed(6);
  const encodedLabel = label ? encodeURIComponent(label) : "";

  return {
    geoUri: `geo:${latStr},${lngStr}?z=${zoom}`,
    googleMaps: `https://www.google.com/maps?q=${latStr},${lngStr}${
      label ? `(${encodedLabel})` : ""
    }&z=${zoom}`,
    appleMaps: `https://maps.apple.com/?ll=${latStr},${lngStr}&z=${zoom}`,
    osm: `https://www.openstreetmap.org/?mlat=${latStr}&mlon=${lngStr}#map=${zoom}/${latStr}/${lngStr}`,
  };
}

// Usage
const links = buildMapLinks(40.7128, -74.006, 15, "Office HQ");
console.log(links.geoUri);
// geo:40.712800,-74.006000?z=15

Pro tip: Always validate that latitude falls between -90 and 90, and longitude between -180 and 180, before building the link. Malformed coordinates silently produce broken or misleading map links instead of throwing an obvious error.

Method 3 — Converting DMS to Decimal Degrees

GPS receivers, surveying equipment, and photo EXIF data often store coordinates in Degrees-Minutes-Seconds (DMS) format rather than decimal. Before you can build a standard map link, you need to convert DMS to decimal degrees.

javascript — dms to decimal conversion
  function dmsToDecimal(degrees, minutes, seconds, direction) {
                                    let decimal = degrees + minutes / 60 + seconds / 3600;
                                    if (direction === "S" || direction === "W") {
                                        decimal = -decimal;
                                    }
                                    return decimal;
                                    }

                                    // Example: 40°42'46.1" N, 74°0'21.6" W (New York City)
                                    const lat = dmsToDecimal(40, 42, 46.1, "N"); // 40.712806
                                    const lng = dmsToDecimal(74, 0, 21.6, "W");  // -74.006000

The reverse conversion — decimal back to DMS, useful for display purposes — follows the same logic in the opposite direction:

javascript — decimal to dms conversion
function decimalToDMS(decimal, isLat) {
  const abs = Math.abs(decimal);
  const deg = Math.floor(abs);
  const minFloat = (abs - deg) * 60;
  const min = Math.floor(minFloat);
  const sec = ((minFloat - min) * 60).toFixed(2);
  const dir = isLat
    ? decimal >= 0 ? "N" : "S"
    : decimal >= 0 ? "E" : "W";
  return `${deg}°${min}'${sec}" ${dir}`;
}

Method 4 — Choosing the Right Link for Each Platform

Not every recipient uses the same maps app. Picking the right link format for the context avoids unnecessary redirects or broken previews.

geo: URI

Sharing within a native mobile app (Android intent or iOS universal link) where you want the device to decide the maps app.

geo:40.7128,-74.0060?z=15

Google Maps

Sharing broadly — works reliably across almost every device and browser, mobile or desktop.

https://www.google.com/maps?q=40.7128,-74.0060&z=15

Apple Maps

Sharing specifically with iPhone or Mac users who prefer Apple's native maps app.

https://maps.apple.com/?ll=40.7128,-74.0060&z=15

OpenStreetMap

Embedding a live preview on a website, or sharing with users who prefer open-data mapping.

https://www.openstreetmap.org/?mlat=40.7128&mlon=-74.0060#map=15

Embedding a Live Map Preview

A link alone doesn't let someone verify the pin without leaving the page. Embedding an OpenStreetMap iframe gives an instant visual check before sharing further.

html — embed an interactive map preview
<iframe
  src="https://www.openstreetmap.org/export/embed.html?bbox=-74.016,-40.7228,-73.996,40.7028&layer=mapnik&marker=40.7128,-74.0060"
  width="100%"
  height="300"
  style="border:0"
  loading="lazy"
></iframe>

The bbox parameter defines the visible map bounds — a small delta (e.g. ±0.01 degrees) around your coordinate keeps the marker centered and reasonably zoomed. This is exactly the approach used in the QuickTextTools Lat/Long to Geo Link Converter live preview.

Common Mistakes and How to Avoid Them

Swapping latitude and longitude order

Cause: Coordinates are conventionally written latitude first, longitude second — reversing them silently points to a completely different (often invalid or ocean) location.

Fix: Always confirm order against a known reference — latitude ranges -90 to 90, longitude ranges -180 to 180, so an out-of-range value is a strong sign they're swapped.

Forgetting the negative sign for West/South

Cause: Omitting the negative sign for Western longitudes or Southern latitudes silently mirrors the location to the opposite hemisphere.

Fix: In decimal format, West and South must always be negative. In DMS format, make sure the direction letter (S or W) is correctly selected so the conversion applies the sign.

Assuming geo: links work everywhere

Cause: Desktop browsers generally do not have a registered handler for the geo: scheme, so the link may fail to open or show a browser error.

Fix: Use geo: links for native mobile app contexts, and fall back to a platform-specific link (Google Maps, Apple Maps) for desktop or general web sharing.

Rounding coordinates too aggressively

Cause: Truncating to 2-3 decimal places can shift the pinpointed location by hundreds of meters, which matters for delivery or precise navigation use cases.

Fix: Keep at least 5-6 decimal places for decimal degrees — this preserves sub-meter precision suitable for almost any real-world use case.

Related Tools & Resources

Frequently Asked Questions

Ready to Convert Your Coordinates?

Skip the manual link building. Enter your coordinates, click generate, and get every map link format plus a live preview in seconds.

Open Lat/Long to Geo Link Tool