GIS Conversion

Shapefile Creator: GeoJSON, KML, GPX and CSV to SHP

Load your file, choose the coordinate system and character encoding, and download point, line and polygon layers with .shp, .shx, .dbf, .prj and .cpg files in one ZIP.

1 Input

KML, GPX and GeoJSON coordinates are read as WGS 84.

2 Output coordinate system

3 Options

Z values are checked when a file is loaded.

Your file is processed in your browser and is not sent to a server. The only network requests are the OpenStreetMap and Esri tiles for the preview map.

Related Tools

What a shapefile is and why it is still requested

The shapefile is a vector data format that Esri published in the early 1990s together with an openly available technical description. It is not a single file but a set of files sharing one name: geometry in .shp, an index in .shx, the attribute table in .dbf, the coordinate system in .prj and the character encoding in .cpg. It remains one of the formats most often named in data delivery specifications and used to move data between different GIS applications. This tool converts GeoJSON, KML, KMZ, GPX and CSV or Excel files with coordinate columns into that set and hands it to you as a single ZIP.

How to use it

  1. Choose or drop a file. For CSV and Excel files, check the latitude and longitude columns.
  2. Pick the output coordinate system. To work in metres, use a UTM zone or a TUREF 3° TM zone; the tool suggests a zone from the location of your data.
  3. Set the character encoding. UTF-8 is recommended; choose Windows-1254 only for older software that cannot read Turkish characters otherwise.
  4. In the field mapping table, include or exclude fields and edit the short names if needed.
  5. Press Create Shapefile. The ZIP contains one layer per geometry type and the mapping CSV.

Layers and geometry types

A shapefile can hold only one geometry type, so points, lines and polygons go to separate layers (name_points, name_lines, name_polygons). Multi-part geometries such as MultiLineString and MultiPolygon stay as one record with several parts; MultiPoint geometries go to a separate multipoint layer. Each member of a GeometryCollection is added to the layer of its own type with the same attributes.

If the coordinates carry elevation (Z), the PointZ, PolyLineZ and PolygonZ types are used. KML files often store an altitude of 0, so when every Z value is zero the layers are written in 2D by default. Polygon rings are ordered as the format requires: outer rings clockwise, inner rings (holes) counter-clockwise. Some software misreads rings stored the other way round.

Field names and attribute types

The DBF format limits field names to 10 characters. The tool converts names to ASCII (ğ becomes g, ж becomes zh), turns spaces and special characters into underscores and adds suffixes such as _1 and _2 when shortened names collide. Source and new names are listed in the mapping table and written to a CSV file in the ZIP, so the recipient can trace every column back to its original name.

Types are detected from the values: fields with only numbers become numeric (N), only dates become date (D), true/false values become logical (L) and everything else becomes text (C). Codes with meaningful leading zeros, such as "007", stay as text. Because the DBF date type cannot store a time, date-time values are written as text. Text fields hold at most 254 bytes; longer values are cut and flagged in the table. In UTF-8 a Turkish or Cyrillic letter takes two bytes, so the limit is reached a little earlier in characters.

Character encoding: UTF-8 or Windows-1254

With UTF-8, text is stored as UTF-8 and the .cpg file contains "UTF-8"; current GIS software reads this file and shows Turkish and Cyrillic characters correctly. The Windows-1254 option is for older software that ignores the .cpg file: text is written with the Turkish Windows code page, the language driver byte in the DBF header is set to that code page and the .cpg file contains "1254". Characters with no equivalent in that code page, such as Cyrillic letters, become question marks, and the tool warns you when this happens.

Coordinate systems and the .prj file

Coordinates are transformed with proj4js and the .prj file is written in Esri WKT: GCS_WGS_1984 for WGS 84, names such as WGS_1984_UTM_Zone_35N for UTM, TUREF_TM30 and similar for TUREF 3° TM, and WGS_1984_Web_Mercator_Auxiliary_Sphere for Web Mercator. These correspond to EPSG:4326, 326xx and 327xx, 5253-5259 and 3857. No datum shift is applied between TUREF and WGS 84; the difference is negligible for general GIS work. Web Mercator is meant for display, so do not measure in it. If a GeoJSON file contains a legacy crs member (for example EPSG:5254), the tool reads the input system from it.

Data and method

The shapefile and DBF writer is this page's own code, written to Esri's shapefile technical description. KML and GPX are read with @tmcw/togeojson 5.8.0 (BSD-2-Clause), KMZ files are opened and the ZIP is built with JSZip 3.10.1 (MIT), CSV is read with Papa Parse 5.4.1 (MIT), Excel with SheetJS 0.18.5 (Apache-2.0), and coordinates are transformed with proj4js 2.9.0 (MIT). Map basemaps come from OpenStreetMap contributors and Esri. Open-source libraries used and their licences: Data Sources.

Limits

For larger projects

If you regularly move CAD drawings and mixed-format data into a GIS database and need the layer and attribute structure preserved, you can read about our work on the Rodosto Teknoloji website or reach us through the contact page.

Frequently Asked Questions

Why do accented or non-Latin characters look broken in my shapefile?

If your software ignores the .cpg file, it displays UTF-8 text with a different code page. First check that the .cpg file has the same name as the .dbf and sits in the same folder. If the software is old, recreate the file with the Windows-1254 encoding (for Turkish text).

Why does a KML to shapefile conversion produce more than one layer?

A shapefile can hold only one geometry type. A KML file can mix points, lines and polygons, so each type is written to its own layer. All layers are in the same ZIP file.

Why were my field names shortened?

The DBF format limits field names to 10 characters. The tool shortens names, converts accented and Cyrillic letters to ASCII and numbers any names that collide. Source and new names are shown in the mapping table and written to a CSV file inside the ZIP.

Which coordinate system should I choose?

Use the system required by whoever receives the data. For measurements in metres, choose the UTM zone that covers your data; in Turkey, large-scale mapping uses the TUREF (ITRF96) 3° TM zones. If the data is only for a web map or will be reprojected elsewhere, WGS 84 is enough.

Are my files uploaded to a server?

No. Reading the file, transforming coordinates and writing the shapefile all happen in your browser. The only network requests are the OpenStreetMap and Esri tiles for the preview map, and they carry none of your file's content.