How much energy can a magnetar's giant flare release compared to the Sun?
More energy than the Sun produces in a century
The most spectacular manifestations of magnetar activity are giant flares, which release an astonishing amount of energy instantaneously. These colossal events have the capability to discharge more total energy in a mere fraction of a second than the Sun manages to produce over the span of one hundred years. This immense burst of energy originates from the sudden release of magnetic energy stored in the star's structure when unstable magnetic field lines snap and rapidly reconnect. This process demonstrates the extraordinary efficiency with which magnetars convert stored magnetic energy into observable electromagnetic radiation across the X-ray and gamma-ray spectra.

#Videos
What if a Magnetar Came Close to Earth? - YouTube