ForHosting KIT · Images

Parse image GPS EXIF

Turn the degrees, minutes and seconds a camera stored into the decimal coordinates a map understands, such as 40.446333333333 and -79.982333333333. The N, S, E or W letter sets the sign, so south and west come out negative. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Latitude
40, 26, 46.8
Latitude ref
N
Longitude
79, 58, 56.4
Longitude ref
W
You get
Latitude
40.4463333333
Longitude
-79.9823333333
Latitude dms
40, 26, 46.8
Longitude dms
79, 58, 56.4

Image metadata often stores a location as four separate GPS EXIF tags rather than as familiar decimal coordinates. This parser accepts the latitude and longitude degrees, minutes, and seconds arrays together with their reference letters, validates the raw values, and returns signed decimal latitude and longitude. It gives developers, archivists, investigators, and photo workflow teams a small deterministic conversion step that can sit directly after an EXIF reader. North and east become positive values, while south and west become negative values.

Map the raw GPS EXIF tags to the input fields

EXIF represents a photographed location using GPSLatitude, GPSLatitudeRef, GPSLongitude, and GPSLongitudeRef. The first and third tags usually arrive from an EXIF library as three numeric values in degrees, minutes, and seconds order. Send those arrays as latitude and longitude.

For example, a camera may report latitude values of forty, twenty-six, and forty-six point eight with an N reference, plus longitude values of seventy-nine, fifty-eight, and fifty-six point four with a W reference. Do not insert a negative sign into the DMS arrays: the reference tag supplies the sign. Lowercase references are normalized to uppercase, which helps when metadata libraries vary in presentation.

Each array must have exactly three finite numbers. Minutes and seconds must both be at least zero and less than sixty. Latitude degrees cannot exceed ninety, longitude degrees cannot exceed one hundred eighty, and a coordinate exactly on either maximum must have zero minutes and seconds.

These checks distinguish valid raw EXIF coordinates from malformed metadata before the result enters a map, database, or geospatial index. The tool expects already extracted tags; it does not decode an uploaded image itself, so pair it with the EXIF reader used in your application.

Understand the conversion and reference validation

For each axis, the parser computes a magnitude by adding degrees, minutes divided by sixty, and seconds divided by thirty-six hundred. It then applies the direction encoded by the corresponding reference. N keeps latitude positive and S makes latitude negative.

E keeps longitude positive and W makes longitude negative. Reference validation is intentionally strict. A latitude reference must be N or S, and a longitude reference must be E or W.

The response includes normalized reference letters and the original validated DMS arrays alongside the two decimal numbers, making it easy to audit a batch conversion. All operations are deterministic arithmetic with no network request, clock, random input, or external model.

Use decimal coordinates safely in photo workflows

Once converted, latitude and longitude can be written to GeoJSON, shown on a map, indexed for proximity search, or compared with location records from another system. Keep the pair together and preserve its axis order: this response names latitude first and longitude second, while some geometry formats represent a point as longitude followed by latitude. Retaining the normalized references and DMS arrays can make migrations easier to review, especially when a collection contains images from both hemispheres.

Treat missing or invalid tags as data-quality events instead of replacing them with zero, because zero latitude and zero longitude is a real point in the Gulf of Guinea. The parser also rejects non-finite values, incomplete arrays, out-of-range components, and impossible values beyond the poles or antimeridian. It does not verify that the camera truly occupied the reported position, account for GPS datum differences, or inspect privacy implications.

Before publishing photos, consider whether exposing precise coordinates is appropriate; GPS metadata can reveal homes, workplaces, or sensitive natural sites.

Normalize a photo archive

Convert extracted GPS EXIF arrays into consistent decimal coordinates before indexing a large image collection.

Place photographs on a map

Turn camera metadata into the signed latitude and longitude expected by mapping libraries and GeoJSON workflows.

Validate an EXIF ingestion pipeline

Reject damaged reference letters and impossible DMS components before location data reaches production storage.

Does this tool read the image file?

No. It converts raw GPS EXIF tags that you have already extracted with an EXIF reader.

Which reference letters are valid?

Latitude accepts N or S, and longitude accepts E or W, case-insensitively.

How are DMS values converted?

The magnitude is degrees plus minutes divided by 60 plus seconds divided by 3600. S and W make the corresponding result negative.

Can minutes or seconds equal 60?

No. Each must be at least zero and less than 60. Normalize carried values before calling the parser.

Should I add a minus sign for south or west coordinates?

No. Enter degrees, minutes and seconds as positive numbers and let the reference letter set the direction: S makes the latitude negative and W makes the longitude negative.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/image/exif-gps-parse

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/image/exif-gps-parse \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"latitude":[40,26,46.8],"latitude_ref":"N","longitude":[79,58,56.4],"longitude_ref":"W"}'
{
  "latitude": [
    40,
    26,
    46.8
  ],
  "latitude_ref": "N",
  "longitude": [
    79,
    58,
    56.4
  ],
  "longitude_ref": "W"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.exif_gps_parse",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Map the raw GPS EXIF tags to the input fields

Send the accompanying one-letter tags as latitude_ref and longitude_ref.

Understand the conversion and reference validation

Values such as Q, NE, north, an empty string, or a longitude letter placed in latitude_ref return invalid_input instead of guessing. This matters because a valid DMS magnitude paired with a corrupted reference can move a photograph across the equator, prime meridian, or to the wrong axis.

Use decimal coordinates safely in photo workflows

In an automated pipeline, parse only when all four required tags exist, handle invalid_input as a rejected record, and store enough provenance to know which image supplied the location. Browser execution is available without a server round trip, while API automation costs $0.002 per successful item.

What does the API call cost?

A successful API request costs $0.002 per item. The browser runner can perform the same deterministic calculation locally.

Read the full KIT documentation →