We present TopoStats, a Python toolkit for automated editing and analysis of Atomic Force Microscopy images. The program includes identification and tracing of individual molecules in both circular and linear conformations without user input. The program is freely available via GitHub (https://github.com/afmstats/TopoStats), and is intended to be modified and adapted for use if required. TopoStats can identify individual molecules and molecular assemblies within a wide field of view, without the need for prior processing. We demonstrate its power by identifying and tracing individual biomolecules, including DNA origami, pore-forming proteins, and DNA molecules in both closed circular and linear form.