Katy Perry makes the best out of massive wardrobe malfunction on American Idol!

Los Angeles, California - Superstar Katy Perry almost went topless in front of an audience of millions on a recent live taping of American Idol!

Singer Katy Perry has a penchant for quirky outfit choices (archive image).
Singer Katy Perry has a penchant for quirky outfit choices (archive image).  © KEVIN WINTER / GETTY IMAGES NORTH AMERICA / GETTY IMAGES VIA AFP

The Roar singer, who is known for her extravagant and offbeat outfits, wore a reflective sculptural 3D metal top to the singing competition's live taping.

During one of the stage performances, the 39-year-old's silver top suddenly fell off.

Katy was sitting there in her chair nearly shirtless – in front of a live audience!

Megan Fox's ex-fiancé Machine Gun Kelly creates handmade masterpiece for unborn child
Megan Fox Megan Fox's ex-fiancé Machine Gun Kelly creates handmade masterpiece for unborn child

She had to hold onto her outfit with both hands before help finally arrived.

Fellow judges and other members of the production team joined forces trying to fix Katy's unusual top with pliers and scissors.

No one said that fashion was easy, people.

For the rest of the show, the California Girls artist hid behind her desk or else held a pillow in front of her upper body to prevent any further slips in front of the cameras.

Katy Perry doesn't seem to be too embarrassed by her outfit mishap, however, as she posted a hilarious video of the incident.

Fans found the whole situation pretty hysterical, but many also advised the singer to go with a more forgiving fashion choice next time!

Cover photo: KEVIN WINTER / GETTY IMAGES NORTH AMERICA / GETTY IMAGES VIA AFP

More on Katy Perry: