A Shapefile viewer lets you open an ESRI .shp file and see its geometry and attributes without installing QGIS, ArcGIS, or any desktop GIS. Shapefiles are a binary format made of several sibling files, which makes a quick peek awkward. This tool parses the geometry and the dBASE attribute table directly in your browser and draws everything to scale.
How it works
The .shp file follows the ESRI Shapefile Technical Description. It begins with a 100-byte header that includes the dataset’s bounding box, then a sequence of variable-length records. Each record header stores a big-endian content length, and the geometry itself uses little-endian doubles. The viewer reads the shape type of every record and decodes Point, MultiPoint, PolyLine, and Polygon features — including the Z and M variants — extracting the X and Y coordinates and the part offsets that separate rings.
The .dbf file is a classic dBASE table: a header listing each field’s name and byte width, followed by fixed-length records. The parser reads those field definitions, walks each record by summing field widths, decodes the bytes as text, and drops any record marked deleted. The geometry is then projected into an SVG canvas (Y is flipped so north points up) and the attributes are listed in a scrollable table.
What the shapefile family looks like
A typical shapefile export contains several files sharing the same base name:
| Extension | Role |
|---|---|
.shp | Binary geometry records (required) |
.dbf | dBASE attribute table (required for attributes) |
.shx | Index of record offsets — speeds random access |
.prj | WKT coordinate reference system definition |
.cpg | Declares the text encoding of the .dbf |
This viewer needs only the .shp and .dbf. Select both together in the file picker so the attribute rows align with the geometry features.
Understanding the preview
The SVG preview scales all coordinates to fit the canvas, so the shape looks proportional regardless of whether the data is in geographic degrees, metres, or feet. North is up because the Y-axis is flipped during projection. The bounding box reported in the header is shown so you can orient yourself.
Because no basemap is used, you cannot zoom or pan onto a real map here. If you need to overlay the data on a map, export it to GeoJSON (use the companion shapefile-to-geojson tool) and load it into a viewer such as geojson.io or a leaflet-based map.
Typical uses
- Quickly confirming a shapefile exported correctly before handing it off to a client.
- Checking which attributes exist in the
.dbfbefore writing code to process it. - Sanity-checking geometry extents when you do not have GIS software installed.
- Inspecting small government or open-data shapefiles (administrative boundaries, planning zones, transport networks) without needing a licence.
Notes and tips
Always pick the .shp and .dbf from the same export so the rows line up. The preview is coordinate-system agnostic — it simply scales whatever units the file uses — so it works for both projected and geographic data. Because parsing runs entirely client-side, the viewer functions offline and never sends your GIS data anywhere.
Text in the .dbf is decoded as Latin-1 by default, which covers most older shapefiles. If attribute values show garbled characters, the file may use a different encoding declared in a .cpg sidecar.