Foldback inversions, also called inverted duplications, have been observed in human genetic diseases and cancers. Here, we used a Saccharomyces cerevisiae genetic system that generates gross chromosomal rearrangements (GCRs) mediated by foldback inversions combined with whole-genome sequencing to study their formation. Foldback inversions were mediated by formation of single-stranded DNA hairpins. Two types of hairpins were identified: small-loop hairpins that were suppressed by MRE11, SAE2, SLX1, and YKU80 and large-loop hairpins that were suppressed by YEN1, TEL1, SWR1, and MRC1. Analysis of CRISPR/Cas9-induced double strand breaks (DSBs) revealed that long-stem hairpin-forming sequences could form foldback inversions when proximal or distal to the DSB, whereas short-stem hairpin-forming sequences formed foldback inversions when proximal to the DSB. Finally, we found that foldback inversion GCRs were stabilized by secondary rearrangements, mostly mediated by different homologous recombination mechanisms including single-strand annealing; however, POL32-dependent break-induced replication did not appear to be involved forming secondary rearrangements.