Compared with wired networks, ZigBee wireless sensor network (WSN) can not directly view the deployment of each device in the network, and observe the topology of the network, therefore bring inconvenience to the network administrator. To solve this problem, it needs to provide an intuitive visualization of the network topology. ZigBee WSN is based on this topology algorithm networking, and topology analysis tool is based on this algorithm to analyze the network topology. The algorithm can correctly analyze the structure of the network topology, and also has the advantage of convenient, fast, and low power consumption.