Online XYZ file viewer
XYZ is the simplest molecular file format: a list of elements and Cartesian coordinates. Quantum chemistry packages such as ORCA, Gaussian, xTB and CP2K, and many machine-learning datasets, write it. MolViewer opens .xyz files in 3D, draws the bonds for you and lets you measure geometry, free in your browser with no install.
Open caffeine in ball-and-stick

How the XYZ format works
An XYZ file has a two-line header followed by one line per atom:
- The number of atoms.
- A comment line, often the molecule name or an energy. MolViewer uses it as the title.
- One line per atom: element symbol, then x, y and z in ångströms, separated by spaces.
For water, the atom lines might read O 0.000 0.000 0.117, H 0.000 0.757 -0.469 and H 0.000 -0.757 -0.469. There is no connectivity, no residues and no chains: just atoms in space.
Bonds from distances
Because XYZ files contain no bonds, MolViewer infers them. Two atoms are bonded when their distance is close to the sum of their covalent radii, within a small tolerance. This works well for ordinary organic and inorganic molecules. Unusual geometries, such as stretched bonds in a transition state or metal coordination, may gain or lose a bond compared with what you expect, so always check the numbers with the measurement tools.
Bond orders cannot be recovered from coordinates alone, so every inferred bond is drawn the same way. If you need explicit single and double bonds, save the structure as SDF or MOL instead.
Checking a geometry
After an optimization, open the output geometry and click atoms to read bond lengths in ångströms, bond angles and dihedral angles. Label key atoms, export a PNG for your report or slides, and share the scene with a short link. You can load up to 10 structures, for example a reactant and a product, in side-by-side layout to compare them.
For a quick example of the kind of molecule XYZ files usually hold, open caffeine in ball-and-stick and measure a C-N bond.
Frequently asked questions
- Can MolViewer play a multi-frame XYZ trajectory?
- No. If a file contains several frames, such as an optimization path or a molecular dynamics run, MolViewer shows the first frame only. Trajectory playback is not supported.
- Does it read extended XYZ files?
- Partly. MolViewer reads the element and the first three numbers on each atom line, so extra per-atom columns are ignored. Lattice and property information in the comment line is not used.
- Why is a bond missing or extra?
- Bonds in an XYZ file are guessed from interatomic distances and covalent radii. Very long, very short or metal-ligand bonds can fall outside the tolerance. Measure the distance directly to see the actual value.
- Is my file uploaded?
- No. The file is read in your browser and stays on your device unless you choose to create a share link that includes it.
Open caffeine in ball-and-stick