# XYZ — ASCII Gridded XYZ

> XYZ (ASCII Gridded XYZ): Plain-text format listing X, Y and Z values per line, read as a raster when the points form a regular grid. Specs, software and free sample files; convert XYZ to 50 formats online.

- Page: https://beta.mygeodata.cloud/formats/xyz



## What is a XYZ file?

ASCII Gridded XYZ is a simple text format in which each line holds the X and Y coordinates of a grid cell together with a single Z value. There is no formal standard or maintaining organisation. It is widely used for bathymetric and terrain grids, exports from survey and modelling software, and generic data exchange because almost any program can write it.

Values are typically separated by spaces, tabs, commas or semicolons, and an optional header line may name the columns. For the data to be read directly as a raster, the points must lie on a regular lattice with constant spacing and be sorted consistently by rows. Scattered or irregular samples must first be interpolated into a grid. The format stores only one value per location and contains no coordinate reference system, nodata definition or other metadata. As uncompressed text, it produces large files, and reading it is slower than reading binary grid formats.

XYZ grids usually come from surveyors, hydrographers and modelling teams who need a quick way to hand over elevation or depth data. Because the file is plain text, the delimiter, column order, decimal separator and units are not declared, so check them before loading. The coordinate system and nodata value must be obtained separately, and irregular spacing or missing rows can stop it from loading as a raster.

### Technical details

| | |
|---|---|
| Full name | ASCII Gridded XYZ |
| Data type | Raster · Elevation & grid |
| File extension | .xyz, .txt, .csv |
| Files | Single file |
| Media type | — |
| Bands | Single value (Z) per sample. |
| Pixel types | Float or integer (text) |
| Compression | None |
| Coordinate system | Any (georeferenced) |
| Converter support | Read & write |
| Typical software | QGIS, GDAL/OGR, Golden Software Surfer, Global Mapper, SAGA GIS, FME |
| Specification | https://gdal.org/en/stable/drivers/raster/xyz.html |

### Specifications & references

- https://gdal.org/en/stable/drivers/raster/xyz.html

### Sample XYZ files — free download

- [Elevation points (90 m, UTM)](https://beta.mygeodata.cloud/static/landing/samples/v1/ascii_xyz/st-helena-dem-90m.xyz) — Copernicus DEM GLO-30 elevation model of Saint Helena (0–812 m), a surface model including trees and buildings; sea = 0 m. Averaged to 90 m in UTM zone 30S (201×169 px) to keep the text file small. Space-separated X Y Z lines with a header. (791.5 kB, EPSG:32730)

### Convert XYZ to other formats

- [XYZ to GeoPDF raster](https://beta.mygeodata.cloud/converter/xyz-to-geopdf-raster)
- [XYZ to KMZ raster](https://beta.mygeodata.cloud/converter/xyz-to-kmz-raster)
- [XYZ to PNG](https://beta.mygeodata.cloud/converter/xyz-to-png)
- [XYZ to TIF](https://beta.mygeodata.cloud/converter/xyz-to-tif)
- [XYZ to HFA](https://beta.mygeodata.cloud/converter/xyz-to-hfa)
- [XYZ to JPG](https://beta.mygeodata.cloud/converter/xyz-to-jpg)
- [XYZ to GRD](https://beta.mygeodata.cloud/converter/xyz-to-grd)
- [XYZ to DEM](https://beta.mygeodata.cloud/converter/xyz-to-dem)
- [XYZ to BIL](https://beta.mygeodata.cloud/converter/xyz-to-bil)
- [XYZ to MBTiles raster](https://beta.mygeodata.cloud/converter/xyz-to-mbtiles-raster)
- [XYZ to JP2](https://beta.mygeodata.cloud/converter/xyz-to-jp2)
- [XYZ to GIF](https://beta.mygeodata.cloud/converter/xyz-to-gif)
- [XYZ to netCDF raster](https://beta.mygeodata.cloud/converter/xyz-to-netcdf-raster)
- [XYZ to AAIGrid](https://beta.mygeodata.cloud/converter/xyz-to-aaigrid)
- [XYZ to GPKG raster](https://beta.mygeodata.cloud/converter/xyz-to-gpkg-raster)
- [XYZ to BMP](https://beta.mygeodata.cloud/converter/xyz-to-bmp)
- [XYZ to RST](https://beta.mygeodata.cloud/converter/xyz-to-rst)
- [XYZ to WEBP](https://beta.mygeodata.cloud/converter/xyz-to-webp)

## Frequently asked questions

### Why does my XYZ file not load as a raster?

The points probably do not lie on a regular grid with constant spacing, or the rows are not sorted consistently. Irregular or scattered points must first be interpolated to a grid. A wrong delimiter or an unexpected header line can also cause the failure.

### Does an XYZ file contain a coordinate system or nodata value?

No. The format holds only coordinates and one Z value per line, with no CRS or nodata definition. You need to know the coordinate system from the data provider and set it when importing. Nodata values such as -9999 must be handled manually.

### How is XYZ different from Esri ASCII Grid?

Esri ASCII Grid has a header that defines the grid origin, cell size, and nodata value, and lists only Z values. XYZ repeats the X and Y coordinates on every line, so files are larger and carry no metadata.

### What is a XYZ file?

ASCII Gridded XYZ is a simple text format in which each line holds the X and Y coordinates of a grid cell together with a single Z value. There is no formal standard or maintaining organisation. It is widely used for bathymetric and terrain grids, exports from survey and modelling software, and generic data exchange because almost any program can write it.

Values are typically separated by spaces, tabs, commas or semicolons, and an optional header line may name the columns. For the data to be read directly as a raster, the points must lie on a regular lattice with constant spacing and be sorted consistently by rows. Scattered or irregular samples must first be interpolated into a grid. The format stores only one value per location and contains no coordinate reference system, nodata definition or other metadata. As uncompressed text, it produces large files, and reading it is slower than reading binary grid formats.

### How do I open a XYZ file?

XYZ files can be opened in QGIS, GDAL/OGR, Golden Software Surfer, Global Mapper and SAGA GIS. Without any software you can preview and convert them online in MyGeodata Cloud.

### What can I convert XYZ to?

Popular conversions are GeoPDF raster, KMZ raster, PNG, TIF, HFA and JPG. In total the Converter writes XYZ data to 50 formats.

### How do I create a XYZ file?

Convert existing data to XYZ — for example from KMZ raster, TIF, JPG, GRD and HFA. Upload the file, choose XYZ as output and download the result.

