The short answer
Web maps expect longitude and latitude in degrees. Most official shapefiles store coordinates in metres or feet on a flat projected grid instead. When the .prj file that records which grid was used is missing, the software has no choice but to read those large numbers as degrees, and your city ends up somewhere it should not be. Put the original .prj back in the zip and the data snaps into place.
How to recognise which symptom you have
Each landing spot points at a different cause.
- Everything sits near 0°, 0° off West Africa: coordinates are effectively zero or empty — the geometry did not survive the export.
- Data appears far away but keeps its correct shape: projected metres are being read as degrees. Missing or wrong .prj.
- The map is blank and zooms to the whole world: the extent could not be calculated, usually broken or null geometry.
- Points are mirrored or in the wrong hemisphere: latitude and longitude are swapped, common with CSV imports.
- The layer is offset by a few hundred metres only: a datum difference, for example a local national datum versus WGS84.
Projected versus geographic, without the maths
A geographic coordinate system describes a position with angles on a globe — longitude 90.41, latitude 23.81 is central Dhaka. A projected system flattens that globe onto a sheet first, then measures in metres from an arbitrary origin, giving numbers like 761,000 and 2,634,000. Both describe the same place. The trouble starts when a tool is handed the second set without being told which sheet it came from.
The fix, in order
Work down this list; one of the first two solves the vast majority of cases.
- Find the original .prj file and include it in the zip alongside the .shp, .dbf and .shx.
- If the .prj is genuinely lost, ask the data provider which EPSG code the dataset uses — guessing rarely ends well.
- Reproject to WGS84 (EPSG:4326) before publishing to any web map.
- For CSV data, confirm the latitude column holds values between -90 and 90 and longitude between -180 and 180. If your latitudes exceed 90, the columns are swapped.
- Re-open the file and check a landmark you know before trusting the layer.
Codes you will meet most often
EPSG:4326 is plain longitude and latitude in WGS84, the language of web maps. EPSG:3857 is Web Mercator, used for tile rendering. EPSG:32601 to 32660 are the northern UTM zones and 32701 to 32760 the southern ones, common in national survey data — Bangladesh, for instance, mostly appears as UTM zone 45N or 46N, or the local BTM grid. If a number in your .prj looks like one of these, you have projected data and it must be reprojected for the web.
Check it in seconds
Drop the zip into the free shapefile viewer — it reads the .prj and reprojects to WGS84 automatically, so if the shapes land correctly there, your coordinate system information is intact. You can also confirm a single pair of numbers with the coordinate converter or read a known point off a map with the lat/long finder.
Frequently asked questions
Can software guess the coordinate system from the numbers?▾
It can narrow it down — values above 180 are certainly not degrees — but dozens of projected systems produce similar ranges, so a guess can still be hundreds of metres out. Always get the real EPSG code when accuracy matters.
I added the .prj and it is still wrong. Now what?▾
The .prj may describe a different system than the data was actually saved in, which happens when someone assigns a projection instead of reprojecting. Ask the provider to confirm, and compare a known landmark.
Why is my layer offset by only a small distance?▾
That is a datum shift rather than a projection error — the data uses a local national datum while the basemap uses WGS84. A proper reprojection with a datum transformation removes it.
Does this affect GeoJSON too?▾
GeoJSON is defined as WGS84 degrees, so a GeoJSON holding projected metres is invalid and will always draw in the wrong place. Reproject before exporting.
Check your file in the viewer
Get started in seconds. Free tier, no credit card required.
Test your file in the viewer