This invention discloses a foldable and extendable prefabricated partition wall that can be converted to a
modular design, comprising at least one second partition unit (20); the second partition unit (20) includes a first partition door (21), a second partition door (22), two third
steel columns (23), a third wall panel (24), a fourth wall panel (25), two fourth
steel columns (26), a fifth steel column (27), and two second rotating shafts (28). One end of the first partition door and one end of the second partition door are rotatably connected to the third
steel columns, and the other ends of the first partition door and the second partition door are movably connected to one end of the third wall panel and one end of the fourth wall panel, respectively; the two fourth steel columns are fixed to the other ends of the third wall panel and the other ends of the fourth wall panel, respectively; the second rotating shafts are respectively set on the two third steel columns, the first partition door and the second partition door have the same size, and the third wall panel and the fourth wall panel have the same size.