Skip to content
.ply3D mesh

The PLY file format

PLY is a flexible mesh and point-cloud format from Stanford University, widely used for 3D scan data with a color at every vertex.

Open a PLY file now

What is a PLY file?

PLY, the Polygon File Format, was developed in 1994 at the Stanford University graphics laboratory to store the output of 3D scanners. The well-known test models of the Stanford 3D Scanning Repository — the Stanford Bunny among them — were distributed in it, and it has remained a standard of scanning and research software ever since.

The idea behind the format is that a 3D object is a list of elements, and that each element has whatever properties the application needs. A typical file has vertices with x, y and z coordinates and faces that connect them, but vertices can just as well carry a color, a normal, or a measurement such as scan confidence.

How a PLY file is structured

Every PLY starts with a text header, even when the data is binary. The first line is the word ply, followed by a format line that declares ascii, binary_little_endian or binary_big_endian. Then come the element declarations: element vertex 1200 says how many vertices follow, and the property lines below it — property float x, property uchar red — name each value and its data type. The header closes with end_header.

After the header the data follows in exactly the declared order. Faces are written as lists: a count and then that many vertex indices, so triangles, quads and larger polygons can be mixed. Because the header describes the data completely, a reader can skip properties it does not understand, which is what makes the format easy to extend.

Flexibility and its price

PLY is the natural format when data is attached to points. A color per vertex is what a scanner or a photogrammetry program produces before any texture is made, and PLY stores it directly. A file with vertices and no faces is a point cloud, which the format handles as readily as a mesh. The binary encoding is compact and quick to read.

The flexibility has a cost: beyond the common property names there is little standardization, so two programs may disagree about anything unusual. There are no units, no materials in the usual sense, no hierarchy and no way to hold several named objects. PLY is well suited to a single scanned object and a poor choice for a scene or an assembly.

How to open and convert a PLY file

Scan-processing and mesh-editing programs read PLY. For a quick look, the 3D model viewer here opens PLY files in the browser without uploading them. You can rotate the model, inspect the mesh in wireframe and check the number of triangles and the overall size in the statistics.

To use a scan elsewhere, convert it with the 3D model converter: STL for 3D printing, OBJ for modeling tools, GLB for the web. The converter can also write PLY from other formats when a research tool or a scanning workflow expects it. Remember that not every target keeps vertex colors: STL stores triangles only.

Frequently asked questions

What does PLY stand for?

Polygon File Format. The three letters come from the word polygon; the format is also known as the Stanford Triangle Format.

Can a PLY file store color?

Yes. Color is normally stored per vertex as red, green and blue properties, which is how scanners and photogrammetry software record the appearance of a surface.

Is PLY a mesh or a point cloud?

It can be either. With faces it is a mesh; with only vertices it is a point cloud. Many scanning workflows export the raw points and the finished mesh in the same format.

What is the difference between PLY and STL?

Both store polygon surfaces, but PLY shares vertices between faces, can attach color and other data to each vertex, and allows polygons with more than three corners. STL is limited to bare triangles.

Should I use ASCII or binary PLY?

Binary for anything large — it is smaller and loads faster. ASCII is handy for small files that you want to read or edit by hand.