An XYZ file is a point cloud stored as text. Each line is one point, and the first three numbers on it are its X, Y and Z coordinates. Anything after them — intensity, colour, a classification code, a timestamp — is up to whoever wrote the file. Open one in a text editor and it looks like this:

148811.100 170750.000 41.710 25 65 71 70
148811.080 170750.100 39.700 37 62 68 66
148810.570 170750.020 39.710 44 87 92 88That simplicity is why it is everywhere. Every scanner package, survey instrument, GIS, spreadsheet and ten-line script can produce it, so it is the format a point cloud falls back to when nothing better is agreed. It is also why it is the hardest point cloud format to read correctly: the file states almost nothing about itself.
The variants
"XYZ" is a family rather than a specification. The extension is a hint about the layout, not a promise.
| Extension | Usual layout |
|---|---|
.xyz | Space-separated, no header. Three columns, or more after them. |
.pts | Leica Cyclone: the point count alone on the first line, then x y z i r g b, intensity from −2048 to 2047. |
.csv | Comma-separated, usually with a header row naming the columns. Semicolons and decimal commas in European exports. |
.txt | Anything. Tab-separated survey exports, CloudCompare's //X,Y,Z header, plain coordinate lists. |
.ptx | A relative, not a member: one block per scan, each a grid of points with its own scanner position and transform matrix. |
Two near-namesakes are not point clouds at all. The chemistry XYZ format lists atoms — an element symbol and three coordinates per line, under a count and a comment line. And .asc is often the ESRI ASCII grid, a raster with a header of rows, columns and cell size rather than a list of points.
What a line can hold
Beyond the three coordinates, the columns that turn up most are the same ones a LAS file carries:
- Intensity — the strength of the return, on whatever scale the writer chose: 0–255, 0–65 535, 0–1, Leica's −2048…2047, or decibels.
- Colour — red, green and blue, as 0–255 integers, 16-bit integers or 0–1 floats.
- Classification, return number, number of returns, GPS time — when the text was exported from a LAS file, which is common.
- Normals — three columns forming a unit vector, from photogrammetry and from tools that estimate surface orientation.
Some files grid their points: digital elevation models and bathymetry surveys are often distributed as XYZ with one line per grid cell, every X and Y on a regular spacing. Those are still point lists, and read as such.
What the file does not say
This is the part that decides whether a reader gets the file right.
- What the columns are. Without a header, the only convention is that X, Y and Z come first. Seven columns are usually
x y z i r g b, butx y z r g b iis just as possible. Six columns may be colour or normals. - What range a value is on. A colour of 0.8 is bright on a 0–1 scale and almost black on a 0–255 one. Guess wrongly and the cloud comes out black or blown out white.
- The units and the coordinate system. Nothing in the text says whether 148811.1 is metres, feet or something else, nor in which projection. A coordinate system travels, if at all, in a separate
.prjfile. - How many points there are. Except for PTS, which states it on its first line, the count is only known once the last line has been read.
So the honest way to read an XYZ file is to look before deciding: sample lines from across the whole file, infer the delimiter and the ranges, read a header if there is one — and show the result to the person who knows what the data is, so a wrong guess can be corrected rather than baked in.
Size and precision
Text costs a byte per character. A coordinate written as 148811.100 takes eleven bytes with its separator; LAS stores it as a four-byte integer, and LAZ compresses that further still. Measured on one airborne tile of 5.85 million points:
| Stored as | Size | Bytes per point |
|---|---|---|
| CSV, eleven columns | 568 MB | 97 |
| LAS 1.4, point format 7 | 211 MB | 36 |
| LAZ | 36 MB | 6 |
Precision works the other way round from what the size suggests: a text file holds exactly the digits it was written with, no more. Three decimals in metres is a millimetre; two is a centimetre. Converting to LAS should keep that, not invent finer digits that were never measured.
Working with an XYZ file here
Open it in the XYZ viewer — the delimiter, header and column roles are worked out and shown in a table, every role can be changed, and the points are drawn in 3D as soon as they are read.
Convert it to LAS or LAZ — with the precision the file's own numbers use, the coordinate system from its .prj, and bad lines reported by line number instead of quietly dropped. The XYZ vs LAS comparison covers what the conversion gains and decides.
Make one from a LAS or LAZ file — for Rhino, a spreadsheet or a script, with the columns you choose and every coordinate printed exactly as the LAS file stores it. All three tools run in the browser, and nothing is uploaded.