Lat/Long/Height to ECEF Converter
Converts geodetic latitude, longitude and height to ECEF geocentric XYZ coordinates on WGS84.
Inputs
Geodetic latitude, longitude and ellipsoidal height → Earth-centred X, Y, Z, with the inverse round trip.
Enter the values and press Calculate.
Or load an example to see a worked result.
Batch from CSV
One row per calculation, with a header row. Values use the units currently selected in the form above. Up to 10,000 rows; nothing is uploaded.
How the method works
A fixed worked example to explain the method — it is not your result.
Before you rely on this: First-pass guide only. Verify safety-critical or regulated work against the relevant standards, your project requirements and a qualified professional.
How to use this calculator
- Enter the geodetic latitude and longitude (decimal degrees, DMS or DDM).
- Enter the ellipsoidal height h in metres — the GNSS height above the ellipsoid, not an AHD or sea-level height.
- Choose the ellipsoid. For Custom, also enter the semi-major axis a and the inverse flattening 1/f.
- Press Calculate and read X, Y and Z. The inverse round-trip residual shows the conversion reverses cleanly.
How it works
e² = f(2 − f) and N = a / √(1 − e² sin²φ), the radius of curvature in the prime vertical.
X = (N + h) cos φ cos λ, Y = (N + h) cos φ sin λ, Z = (N(1 − e²) + h) sin φ.
X points from the Earth's centre through 0° latitude, 0° longitude; Y through 0°, 90°E; Z through the north pole.
The same kernel drives the ECEF-to-geodetic, ENU and AER converters, so all four agree with each other to the last digit.
Worked example
Perth: −31.95°, 115.86°, h = 50 m on WGS84. N = 6,384,123.742 m, so X = −2,362,768.761 m, Y = 4,874,588.155 m, Z = −3,355,754.763 m. Converting that XYZ back returns the same latitude, longitude and height.
Common mistakes
- Entering an AHD or mean-sea-level height. Convert it to an ellipsoidal height first (add the geoid separation N).
- Treating the ellipsoid choice as a datum transformation. Switching WGS84 to GRS80 changes the shape only; it does not move coordinates between GDA2020, ITRF or WGS84 realisations or epochs.
- Swapping latitude and longitude — the result is still a valid point, just on the other side of the planet.
Frequently asked questions
What is ECEF used for?
Satellite positioning (GNSS), coordinate transformations and 3D vector maths use ECEF Cartesian coordinates.
How different are WGS84 and GRS80?
They share a = 6,378,137 m and differ only in flattening; the largest effect is about 0.1 mm at the poles.
Related tools
- ECEF X/Y/Z to Lat/Long/Height Converter
- ENU (East/North/Up) to ECEF Converter
- Ellipsoidal to Orthometric Height Converter
- Lat/Long to UTM Converter (WGS84)
- UTM to Lat/Long Converter
- Vincenty Ellipsoidal Distance Calculator
Explore more in Surveying, Coordinates, GIS & CAD.
Cite this tool
Zerdly. (2026). Lat/Long/Height to ECEF Converter. Retrieved from https://www.zerdly.com/tools/lat-long-height-to-ecef-converter/
Tip: Enter any known values to calculate the remaining results.
Designed to run locally in your browser. Tool inputs are not intentionally stored by Zerdly unless stated otherwise.



