How to Open a SHP File — No Install, Encoding Fixed
The first wall most people hit in GIS is the Shapefile. You were sent a map file, except it is not one file — it is four or five with the same name and different extensions, and double-clicking does nothing. Then, once it does open, the Korean, Japanese or accented text in the attribute table comes out as question marks. This guide covers how a Shapefile is put together, how to open one without installing anything, and how to fix the encoding problem.
Why is it several files?
A Shapefile is a bundle, not a file. The format dates from the early 1990s and keeps geometry, index and attributes separate. Copying just the .shp gets you nothing.
| Extension | Holds | Required |
|---|---|---|
.shp | The geometry itself — point, line or polygon coordinates | Yes |
.shx | Positional index: where each shape sits inside the .shp | Yes |
.dbf | The attribute table | Yes |
.prj | Coordinate system definition | In practice, yes |
.cpg | Character encoding of the attribute table | Optional but important for non-ASCII |
.sbn ·.sbx ·.qix | Spatial index — performance only | No |
.qmd ·.shp.xml | Metadata | No |
The first four must share exactly the same base name. boundary.shp alongside boundary(1).dbf will not pair up. This is why the convention is to ship Shapefiles inside a .zip.
When the text comes out as garbage
Mangled attribute text is the single most common Shapefile complaint. The cause is that the .dbf does not reliably record which character encoding it used.
Public data from Korea is usually CP949, Japanese data is often Shift-JIS, Western European data may be ISO-8859-1, and anything produced recently is likely UTF-8. If the reader guesses wrong, you get question marks or mojibake.
How to fix it
- Create a
.cpgfile — the most reliable fix. Make a plain text file with the same base name as the.shpand a.cpgextension, containing one line:UTF-8,CP949,SHIFT-JIS, whatever applies. Readers will then stop guessing. - Override the encoding at load time — if you cannot add a
.cpg, choose the encoding when importing. Trial and error between UTF-8 and the likely regional codepage usually settles it quickly. - Ask for a different format — if you are the recipient, request GeoPackage (
.gpkg) or GeoJSON. Both are UTF-8 by definition and the problem disappears.
When .prj is missing
Without .prj the coordinate system is unknown, so the layer lands somewhere absurd — often in the Atlantic off West Africa, where (0, 0) sits — or does not draw at all. The magnitude of the coordinates usually gives the answer away.
| Coordinate values look like | Probable CRS |
|---|---|
| 126.9, 37.5 — small numbers with decimals | Geographic lat/lon, EPSG:4326 |
| Six digits paired with seven, e.g. 500000 / 4500000 | A UTM zone |
| Around 200000 / 450000 (Korea) | Korea 2000 Central Belt, EPSG:5186 |
| Around 14,000,000 / 4,500,000 | Web Mercator, EPSG:3857 |
The coordinate system guide goes into this in detail. Guessing wrong corrupts area and distance calculations as well as position, so when in doubt ask whoever supplied the data.
Step by step: opening one without installing anything
- Zip the parts together —
.shp,.shx,.dbf,.prj, and.cpgif present. - Drag it into the browser — drop the archive onto the map. Files are processed inside the browser and are not uploaded to a server, which matters when the data is not yet public.
- Check the coordinate system — detected from
.prjif present, otherwise set it yourself. - Check the attributes — if text is mangled, reload with a different encoding.
.zip onto the map workspace and it opens immediately. No install, no account. Once open you can export it as GeoJSON, GeoPackage, CSV and other formats.Known limits of the format
Shapefile is old and it shows. Worth knowing if you publish data rather than just consume it.
- Field names capped at 10 characters — longer names get truncated, which is why public datasets are full of cryptic abbreviations.
- 2 GB per file — national-scale detailed data runs into this.
- One geometry type per file — points and polygons cannot share a layer.
- Weak date and time support — timestamps usually end up as text.
- No native null for numbers — missing values often appear as 0, which silently corrupts statistics.
GeoPackage (.gpkg) is the modern recommendation: a single file, UTF-8 throughout, multiple layers, no field-name limit. Shapefile still dominates distribution, though, so for now you need to handle both.