Learn

EPSG:4326 vs EPSG:3857: WGS 84 and Web Mercator Explained

Learn how EPSG:4326 and EPSG:3857 represent location differently, why web maps commonly use both, and which CRS is appropriate for storage, display, and spatial measurement.

Geobble
introductoryexplainerCoordinate SystemsWeb Mapping

Answer a common CRS question clearly while establishing the distinction between geographic coordinates and projected web-map coordinates, without absorbing the broader intents of the CRS pillar, reprojection guide, or Web Mercator distortion article.

EPSG:4326 and EPSG:3857 are two of the coordinate reference systems you are most likely to encounter in GIS and web mapping, but they represent location in fundamentally different ways. EPSG:4326 is a geographic coordinate reference system whose coordinates are expressed as latitude and longitude in degrees. EPSG:3857 is a projected coordinate reference system that represents the world on a flat Cartesian plane, with coordinates expressed in metres.

That distinction explains much of their practical use. Geographic data is commonly exchanged or stored using WGS 84 coordinates, while interactive web maps commonly display that data using Web Mercator. Neither CRS is universally “better”: the appropriate choice depends on what you are trying to do with the coordinates.

The difference at a glance

  • EPSG name: EPSG:4326 — WGS 84; EPSG:3857 — WGS 84 / Pseudo-Mercator

  • CRS type: EPSG:4326 — Geographic 2D; EPSG:3857 — Projected

  • Coordinate form: EPSG:4326 — Latitude and longitude; EPSG:3857 — Easting and northing

  • Units: EPSG:4326 — Degrees; EPSG:3857 — Metres

  • Typical role: EPSG:4326 — Geographic positions and data interchange; EPSG:3857 — Web-map display

  • Flat map coordinates?: EPSG:4326 — No; EPSG:3857 — Yes

  • Appropriate simply because you need metres?: EPSG:4326 — No; EPSG:3857 — No

  • Appropriate for accurate area or distance calculations everywhere?: EPSG:4326 — No; EPSG:3857 — No

The EPSG registry defines EPSG:4326 as a geographic 2D CRS with latitude and longitude axes measured in degrees. EPSG:3857, by contrast, is explicitly defined as a projected CRS with easting and northing coordinates measured in metres, with a stated scope of web mapping and visualisation.

The difference therefore goes deeper than coordinate formatting. Moving between them involves a projection: a mathematical transformation between positions on the Earth and positions on a plane.

What is EPSG:4326?

EPSG:4326 is the two-dimensional geographic CRS named WGS 84 in the EPSG dataset. Instead of placing locations on a flat Cartesian grid, it describes horizontal positions using angular coordinates on the WGS 84 reference system. Its coordinate units are therefore degrees rather than metres.

A location might consequently be described with values such as a latitude of roughly 4 degrees north and a longitude of 12 degrees east. Those numbers do not mean that the location is four metres north and twelve metres east of an origin. They describe angles relative to the equator and the prime meridian.

This makes latitude and longitude convenient for communicating positions across the globe, but degrees are not fixed units of ground distance. One degree of longitude covers a different distance near the equator than it does at high latitude, for example. Treating degree differences as though they were ordinary Cartesian distances can therefore produce badly misleading measurements.

That does not make EPSG:4326 deficient. It means that a geographic CRS and a projected CRS solve different problems.

What is EPSG:3857?

EPSG:3857, formally named WGS 84 / Pseudo-Mercator, takes geographic positions and projects them onto a flat coordinate system. Its axes are easting and northing, and its coordinate unit is the metre. EPSG describes its purpose specifically as web mapping and visualisation.

It is the projection behind the familiar geometry of a large proportion of slippy web maps. A tiled map needs a planar coordinate space that can be subdivided predictably across zoom levels, and Web Mercator became the dominant solution for that purpose. PROJ likewise describes Web Mercator as the de facto standard projection used by major web-mapping applications.

This practical success sometimes creates a misleading intuition: because EPSG:3857 coordinates are expressed in metres, it can look like the obvious CRS for measuring distances or areas.

It is not.

The word metre tells you the unit of the projected coordinate system. It does not guarantee that one metre measured on that map corresponds everywhere to one metre on the ground. Projection scale varies with latitude, and the distortion becomes increasingly significant as you move away from the equator. EPSG itself describes 3857 as a system for web mapping and visualisation rather than a general-purpose CRS for accurate spatial measurement.

For analytical work, the correct projected CRS depends on the location, geographic extent and property you need to preserve. A suitable local or regional projection may be much more appropriate.

Why do web maps use EPSG:3857 if the data is often in WGS 84?

Because the CRS in which data is stored or exchanged does not have to be the CRS in which it is rendered.

A dataset may contain geographic positions based on WGS 84 while a mapping application projects those positions into EPSG:3857 for display. Modern GIS and mapping software can often perform this transformation automatically, which is why users can place layers from different CRSs on the same map and still see them align.

This is often called on-the-fly reprojection. It can make the underlying distinction almost invisible: you may be looking at a Web Mercator map even though the coordinates supplied to the application were longitude and latitude.

That convenience is useful, but it can also create confusion when coordinates are exported, processed outside the mapping application, or passed to software that expects a different CRS. The numbers themselves do not contain enough information to tell you how they should be interpreted.

A pair such as 12, 4 could represent angular longitude and latitude values, while a pair such as 1,335,833, 445,640 could plausibly represent projected coordinates in metres. But coordinate magnitude is only a diagnostic clue. The CRS metadata is what gives the numbers their geographic meaning.

A subtle trap: EPSG:4326 does not always mean “longitude, latitude”

There is another complication worth knowing because it causes an extraordinary amount of confusion in software.

The formal EPSG definition of EPSG:4326 orders its axes as latitude, then longitude. OGC standards that respect the EPSG axis definition therefore treat that order as significant.

Many web-development conventions, however, use longitude, then latitude, because longitude behaves like the horizontal x coordinate and latitude like y.

GeoJSON is an important example. RFC 7946 requires positions to be written longitude first and latitude second and identifies its geographic coordinate convention as equivalent to OGC:CRS84. CRS84 uses the same WGS 84 geographic reference but longitude-latitude axis order, rather than the formal latitude-longitude ordering of EPSG:4326.

In everyday software discussions, people sometimes describe GeoJSON loosely as “using EPSG:4326”. That shorthand is understandable, but it can hide the axis-order distinction.

The practical lesson is not to memorise one universal rule such as “WGS 84 always means longitude first”. Check the format and interface as well as the CRS. Coordinate order is part of the contract between the data and the software reading it.

Which CRS should you use?

If you are choosing only between these two systems, the answer depends on the task.

Use EPSG:4326 when geographic latitude and longitude coordinates are the appropriate representation—for example, when exchanging global positions with a system that explicitly expects WGS 84 geographic coordinates.

Use EPSG:3857 when you need to render data in the conventional Web Mercator coordinate space used by a web map.

For distance, area or other measurements, do not choose EPSG:3857 merely because its units are metres. Select a CRS appropriate to the geography and the measurement. Depending on the task, that may mean a suitable UTM CRS, a national or regional projected CRS, an equal-area projection, or a geodesic calculation that does not require flattening the Earth into the wrong projection first.

Likewise, do not convert a dataset to EPSG:3857 simply because it will eventually appear on a web map. The rendering system may already be able to project the data for display.

The useful question is therefore not:

“Should my GIS data be in 4326 or 3857?”

It is:

“Which coordinate system is appropriate for this stage of the workflow?”

Storage, interchange, visualisation and analysis are different stages, and they need not use the same representation.

Reprojection is not the same as changing the CRS label

One final distinction prevents a particularly destructive class of GIS errors.

If coordinates were calculated in EPSG:4326 and you simply tell software that they are EPSG:3857, you have not reprojected anything. You have changed the interpretation of the existing numbers. The software will now treat degree values as projected metre coordinates, and the data is likely to appear in the wrong location.

A real reprojection calculates new coordinates that represent the same geographic positions in the target CRS.

The reverse problem occurs when coordinates already expressed in one CRS are incorrectly assigned another. This is why diagnosing a misplaced GIS layer begins with understanding what coordinate values you actually have, rather than repeatedly changing CRS settings until the map looks plausible.

That distinction deserves its own treatment, so the mechanics of assigning a CRS versus reprojecting data are best handled separately rather than folded into the 4326-versus-3857 question.

The practical distinction

EPSG:4326 and EPSG:3857 frequently appear together because modern web mapping moves between two useful representations of the same geographic world. EPSG:4326 describes horizontal positions geographically using WGS 84 latitude and longitude. EPSG:3857 projects geographic positions into the flat coordinate space that has become standard for web-map visualisation.

Confusing them can shift data, corrupt measurements or make apparently reasonable coordinates difficult to interpret. Treating them as different tools rather than competing standards makes the choice much simpler.

Use the CRS that matches the operation you are performing—and remember that the CRS used to display a map does not have to be the CRS best suited to analyse the geography behind it.


References

  1. EPSG Registry — WGS 84 (EPSG:4326). Official definition of the geographic 2D CRS, its coordinate system, axes and units. EPSG:4326 registry entry

  2. EPSG Registry — WGS 84 / Pseudo-Mercator (EPSG:3857). Official definition, scope, coordinate system and remarks for Web Mercator. EPSG:3857 registry entry

  3. PROJ — Web Mercator / Pseudo Mercator. Technical documentation for the Web Mercator projection and its implementation. PROJ Web Mercator documentation

  4. IETF RFC 7946 — The GeoJSON Format. Defines GeoJSON's WGS 84 geographic coordinate convention and longitude-latitude position order. RFC 7946