More isolated DC-DC converter topologies are required as a result of the growing need for different power conversion brought on by the development of new energy generation and electrified transportation. To overcome the randomness and lack of topology optimization in generating topologies based on human experience, this paper proposes a vertex prime degree-based topology self-generation method of the isolated DC-DC converters with two switches. Firstly, the two-vertex-pair transformer model is proposed, and the circuits are converted into graphs using graph theory. Secondly, the numbers and the types of components used to form the circuit are regarded as the input condition of the method. Finally, the proposed self-generation method is utilized to traverse and generate all available isolated DC-DC converter topologies with the given components. An input DC source, an output DC source, two switches, two diodes, one transformer, one inductor, and one capacitor, namely, the isolated T1S2D2L1C1 DC-DC converters are examples of converter circuits. The 87 forward converters and 97 flyback converters can be generated. Taking the 87 forward converters as examples, they can be further categorized based on voltage gain into 25-boost forward converters, 24-buck forward converters, 32 buck-boost forward converters, and 6 constant voltage forward converters. Therefore, this method enables rapid and quantitative generation of new isolated DC-DC converter topologies through computer programming. It provides a topology library for engineering applications and establishes conditions for topology optimization and selection.