What Is a CRS (Coordinate Reference System)?
Published
A coordinate reference system (CRS) is the set of rules that ties a pair of coordinates to a real place on Earth. It tells the software which model of the Earth the numbers use, whether they are degrees or metres, and how the round Earth was flattened into a map. Every GIS layer has one, usually written as a short code such as EPSG:4326.
Without the CRS, 651000, 6862000 is just two numbers. With EPSG:2154, it is a point in Paris. With EPSG:4326 by mistake, the same numbers point nowhere, and QGIS draws the layer in the wrong place. That mismatch is behind most "my layer is in the ocean" questions. Below you'll find the fix step by step, and a test of AI Agent, the QGIS plugin we build, which found the right CRS from one message in 52 seconds.

The three parts of a CRS
Every CRS answers three questions. Get one wrong and your data moves.
- The datum: which Earth? The Earth is slightly flattened, not a perfect ball. A datum is a model of that shape, pinned to the planet. WGS 84, used by GPS, is one. ETRS89 in Europe and NAD83 in North America are others.
- The coordinate system: degrees or metres? A geographic CRS gives latitude and longitude in degrees. A projected CRS gives x and y in metres on a flat map.
- The projection: how was it flattened? A projection is the method that turns the round Earth into a flat map. You can't do that without stretching something, so each projection chooses what to keep right: areas, angles or distances.
Geographic vs projected CRS
Both kinds are correct. The difference decides whether a measurement means anything.
| Geographic CRS | Projected CRS | |
|---|---|---|
| Units | Degrees of latitude and longitude | Metres or feet |
| Example | EPSG:4326 (WGS 84) | EPSG:32643 (WGS 84 / UTM zone 43N, western India) |
| Good for | Storing and exchanging global data, GPS positions | Measuring areas and distances, engineering, national mapping |
| Bad for | Areas and lengths: a degree of longitude is 111 km at the equator and 0 km at the poles | Areas far from where the projection was designed to work |
My rule: keep data in the CRS it came in, but measure in a projected CRS made for your area. An area computed in EPSG:4326 comes back in square degrees. It still looks like a number, which is why people ship it.
What an EPSG code is
An EPSG code is a short number that names one CRS exactly. The list started with the European Petroleum Survey Group, hence the name, and the International Association of Oil & Gas Producers keeps it today. It holds over 7,000 CRSs.
These are the codes I meet most often:
| Code | Name | Where and why |
|---|---|---|
EPSG:4326 | WGS 84 | GPS coordinates, GeoJSON, most global datasets |
EPSG:3857 | WGS 84 / Pseudo-Mercator | Web map tiles: OpenStreetMap, Google, Bing, Esri basemaps |
EPSG:2154 | RGF93 / Lambert-93 | The legal CRS for mainland France |
EPSG:25832 | ETRS89 / UTM zone 32N | Germany, Denmark, Norway and much of central Europe |
EPSG:32643 | WGS 84 / UTM zone 43N | Western India, including Mumbai and Pune |
EPSG:31983 | SIRGAS 2000 / UTM zone 23S | South-east Brazil, including São Paulo state |
EPSG:26918 | NAD83 / UTM zone 18N | The US east coast, including New York |
One trap hides in the first row. The official EPSG:4326 puts latitude first, but most software, QGIS included, and GeoJSON read longitude first (GeoTools explains why). If your CSV points land in Antarctica or off Somalia, check for swapped columns first.
EPSG:4326 vs EPSG:3857
EPSG:4326 stores positions in degrees. EPSG:3857, called Web Mercator, turns them into a square grid in metres so a map can be cut into tiles. Google Maps adopted it in 2005, and nearly every online basemap followed. It's great for display and bad for measuring, because it stretches areas more and more as you move away from the equator.

I measured how much in QGIS, with a real 1 km² square at six cities:
| City | Latitude | Area of 1 km² on a Web Mercator map |
|---|---|---|
| Quito | 0.2° S | 1.007 km² |
| Mumbai | 19.1° N | 1.126 km² |
| Madrid | 40.4° N | 1.727 km² |
| Berlin | 52.5° N | 2.696 km² |
| Oslo | 59.9° N | 3.966 km² |
| Tromsø | 69.7° N | 8.226 km² |
The rule of thumb, 1 / cos²(latitude), lands within 0.6% of every measurement. Even on the equator, Web Mercator adds 0.67%, because it uses the formulas of a sphere on an Earth that isn't one.
How we measured this. On 26 September 2026, in QGIS 3.44, I drew each square at its true size (1.000000 km² on the WGS 84 ellipsoid, checked with $area). I then reprojected it to EPSG:3857 and read its flat area with area($geometry).
So a field measured on a Web Mercator layer in Oslo comes out about four times too big. Measure in the right CRS instead: your country's official CRS or your UTM zone gives areas right to within a fraction of a percent.
Datums: when the same coordinates are metres apart
Two CRSs can both say "latitude 40.7, longitude −74.0" and mean points metres apart, because they use different datums. How far apart depends on the pair:
| From | To | Typical shift | Source |
|---|---|---|---|
| NAD27 | NAD83 | 10 to 100 m in the lower 48 US states, over 400 m in Hawaii | USGS |
| NAD83 | WGS 84 | About 1 to 2 m across most of the US | North American Datum |
| ETRS89 | WGS 84 | About 90 cm today, growing 2.5 cm a year | EuroGeographics / EUREF, 2025 |
Europe is the surprising case. ETRS89 moves with the European tectonic plate, which drifts about 2.5 cm a year, and WGS 84 doesn't. So a point fixed in ETRS89 in 1989 now sits about 90 cm from its WGS 84 position, though nothing on the ground moved. On a basemap, nobody sees it. On a land survey, it matters.
When QGIS knows several ways to convert between two datums, it asks you to choose. Pick the most accurate one for your area instead of closing the dialog.
Why your layers don't line up in QGIS
QGIS reprojects on the fly: each layer keeps its own CRS, and QGIS converts them all to the project CRS for display. That works as long as each layer's CRS is declared correctly. If a label is wrong, QGIS converts from the wrong starting point.
To show it, I saved the 1,015 OpenStreetMap buildings of Bamberg's old town, in Germany, in metres (EPSG:25832), with a .prj file that wrongly says WGS 84, in degrees. QGIS believed the file. In a Web Mercator project, the layer is ticked but draws nowhere, because 635,460 degrees of longitude is not on the planet. Zoom to Layer in a WGS 84 project finds the buildings alone on a blank canvas.

It's a common problem, and not only for beginners. Of 1,692 QGIS tutorials on YouTube, 155 (9.2%) have a comment asking about a CRS or layers that won't line up. On GIS Stack Exchange, the coordinate-system tag holds 8,402 questions.
The most repeated answer there comes from one experienced user: "In ca. 99% of cases, people simply use 'set CRS' instead of reprojecting, because they don't know the difference." The two tools do opposite things:
- Set Layer CRS changes the label and keeps the numbers. Use it only when the label was wrong, for example a shapefile that lost its
.prjfile. - Reproject Layer keeps the place and changes the numbers. Use it when the label is right and you need the data in another CRS.
Using Set Layer CRS on a layer that was already right moves it to the wrong place. That's the classic "I reprojected and now it's worse".
How to fix a CRS problem in QGIS
Read what the layer claims
Right-click the layer, Properties > Information. The CRS line shows what QGIS thinks the coordinates are. The status bar at the bottom right shows the project CRS.
Look at the raw numbers
Click a feature with the Identify tool, or open the attribute table of a point CSV. Values between −180 and 180 are degrees. Values in the hundreds of thousands or millions are metres in a projected CRS. If the numbers don't match the claimed CRS, the label is wrong.
Fix the label, or convert the data
Wrong label: Layer > Set CRS of Layer(s), and pick the CRS the data was really made in. The supplier's notes or the country's standard CRS usually tell you. Right label, but you need another CRS: Processing Toolbox > Reproject layer.
Set the project CRS for your area
Click the CRS button in the status bar and pick a projected CRS that fits your area before you measure anything.
For the Bamberg layer, the label was the problem, so the fix was Set CRS of Layer(s): type 25832 in the filter and pick ETRS89 / UTM zone 32N.

Not a single coordinate changed. With the label now matching the numbers, all 1,015 outlines sat on their roofs.

Let an agent diagnose it
We build AI Agent, a QGIS plugin, so this section is about our own tool. The manual route above is free and takes a few minutes once you know it. The hard part is knowing which CRS the data was really made in, so I tested whether an agent could work it out.
I reloaded the broken layer and sent one message: "My buildings layer doesn't line up with the basemap. Find out why and fix it." In 52 seconds, the agent read the .prj, saw the coordinates were metres, and picked EPSG:25832 by checking where the town hall landed on the aerial photo. It ruled out an older European CRS for the same area, which puts the building about 225 m off. It saved a corrected copy and left the original file untouched.

It left one hidden temporary layer in the project to delete by hand. Like you, it needs a basemap or a reference layer to check against.
Try AI Agent free in QGIS, no card needed
Which CRS should you use?
| You want to | Use | Why |
|---|---|---|
| Show data on a web basemap | EPSG:3857 | It's what the tiles are in |
| Store or exchange global data | EPSG:4326 | Universal, and what GeoJSON expects |
| Measure areas and lengths in a country | The national CRS, or the local UTM zone | Designed for that area, in metres |
| Measure across a continent | An equal-area CRS, such as EPSG:3035 for Europe | Keeps areas true over large extents |
| Deliver to a government client | Their legal CRS, such as EPSG:2154 in France | It's usually in the contract |
To change the project CRS, click the EPSG button at the bottom right of the QGIS window. It opens Project Properties > CRS, where you can search by code or name.

What to remember
A CRS ties coordinates to a place on Earth through a datum, a coordinate system and, for flat maps, a projection.
An EPSG code names one CRS exactly: EPSG:4326 is GPS latitude and longitude, EPSG:3857 is the Web Mercator grid of online basemaps.
Web Mercator inflates areas by about 1 / cos²(latitude). Measured in QGIS, a 1 km² square covers 1.73 km² at Madrid, 3.97 km² at Oslo and 8.23 km² at Tromsø. Measure in a national or UTM CRS instead.
When a layer doesn't line up, check the raw numbers before touching anything. Set Layer CRS fixes a wrong label, Reproject Layer converts correct data, and mixing them up moves the layer.
An AI agent inside QGIS can do the diagnosis for you: in our test, AI Agent named the right CRS and fixed a copy of the layer from one message.
Questions people ask
What is a CRS in GIS?
A coordinate reference system tells GIS software where a layer's coordinates are on Earth. It combines a datum (the model of the Earth's shape), a coordinate system (degrees or metres) and, for flat maps, a projection. Each layer has one, usually named by an EPSG code.
What is the difference between EPSG:4326 and EPSG:3857?
EPSG:4326 stores latitude and longitude in degrees on the WGS 84 ellipsoid. EPSG:3857 projects the same positions to metres on a square grid for web map tiles. Use 3857 to display a basemap and never to measure: it inflates areas by 1.7 times at 40° latitude and 4 times at 60°.
Is WGS 84 the same as EPSG:4326?
In everyday use, yes. Strictly, WGS 84 is the datum, and EPSG:4326 is the latitude and longitude CRS built on it. Other CRSs use WGS 84 too, such as EPSG:3857.
Why is my layer in the wrong place in QGIS?
Its declared CRS doesn't match the coordinates in the file. Common causes are a missing .prj file, a CSV with latitude and longitude swapped, or Set Layer CRS used where Reproject Layer was needed. Check the raw coordinates with the Identify tool, then correct the label with Set Layer CRS only if it was wrong.
What is the difference between Set CRS and Reproject in QGIS?
Set Layer CRS changes the CRS label and keeps the coordinate numbers, so it moves the layer unless the old label was wrong. Reproject Layer keeps the layer in place and recalculates the numbers into the new CRS. Use the first to repair metadata, the second to convert data.
Can QGIS find the right CRS automatically?
Not by itself. QGIS reads the CRS from the file, such as the .prj next to a shapefile, and asks when there is none. It doesn't check whether the coordinates fit. An AI agent plugin can. Ours, AI Agent, compares the coordinates with a basemap, finds the CRS and fixes a copy of the layer, from one message typed in QGIS.
Which CRS should I use for measuring area?
A projected CRS designed for your area: your country's official CRS, or the UTM zone you are in. For areas across a continent, use an equal-area CRS such as EPSG:3035 in Europe. Never measure area in EPSG:4326 (square degrees) or EPSG:3857 (inflated away from the equator).
The CRS is also where georeferencing a scanned map starts, since the points you place only mean something in a known system. What QGIS is covers the rest of the software, PyQGIS shows how to reproject in code, and AI Agent fixes a layer's CRS from one message typed in QGIS. The QGIS AI hub lists the other AI plugins by task.
draws the layer in the wrong place. That mismatch is behind most "my layer is in the ocean" questions. Below you'll find the fix step by step, and a test of 

