Metadata Editor

EXIF EditorEXIF ReaderRemove MetadataGuidesGlossaryAbout

GPS altitude in photo metadata

At a glance

ExifTool tag namesEXIF:GPSAltitude, EXIF:GPSAltitudeRef
Tag ID / location0x0006 (GPSAltitude), 0x0005 (GPSAltitudeRef)
CategoryGPS
Example value35.4 m Above Sea Level
On metadata-editor.comShown in the EXIF reader, editable in the EXIF editor (JPEG, TIFF)

GPSAltitude (0x0006) is the height where the photo was taken, in meters, stored as one unsigned rational. Since that number can't be negative, the sign is a separate byte, GPSAltitudeRef (0x0005): 0 means above sea level, 1 below. Here is the shore of the Dead Sea, written with exiftool "-GPSAltitude*=-430" photo.jpg (the wildcard sets both tags from one signed value):

[GPS]           GPSAltitudeRef                  : Below Sea Level
[GPS]           GPSAltitude                     : 430 m
[Composite]     GPSAltitude                     : 430 m Below Sea Level

With -n the two GPS tags read 1 and 430, and the composite becomes -430. Software that reads GPSAltitude and skips the Ref puts this photo 430 m above the sea instead of below it.

Sea level or ellipsoid?

The tag says sea level. Many devices don't deliver that. A GNSS receiver computes height above the WGS 84 ellipsoid, a smooth mathematical surface, and Android documents Location.getAltitude() as exactly that. Mean sea level sits above or below the ellipsoid by an amount that depends on where you are: roughly 40 to 50 m over much of Western Europe, about -30 m along the US East Coast, and between about -106 m and +85 m worldwide. A camera app that copies the raw number into GPSAltitude produces a beach photo "at 47 m".

Newer Android versions also expose a mean-sea-level value (getMslAltitudeMeters()), so some apps now write the right thing. Nothing in the file tells you which one you got. If the figure matters, compare against a photo taken at a known elevation.

Values 2 and 3

The current ExifTool documentation lists two more GPSAltitudeRef values, 2 and 3, flagged as explicit sea-level references, so a writer can finally say which surface it used. Older readers don't know them. ExifTool 12.76 prints this for a value of 2 with 120 m:

[GPS]           GPSAltitudeRef                  : Unknown (2)
[Composite]     GPSAltitude                     : 120 m Below Sea Level

The composite is wrong there: 2 is a positive value. When you see 2 or 3, read the raw tags with -n.

Fixing or removing it

Both tags are editable in the EXIF editor on JPEG and TIFF; change them together. Altitude rarely identifies a place on its own, but it travels with the GPS coordinates, and the location removal guide treats it as part of the same GPS block. Phones write it into HEIC and JPEG alike.

Related fields

Other Metadata Tools