How To Remove A Stubbornly Stuck Cake From Its Pan
It's heartbreaking: You soften butter, make sure to not overmix your cake batter, cook it perfectly, cool it, and then go to turn it out — and it doesn't budge. It sticks to the pan. At best, it stays stuck while you puzzle over getting it out. At worst, it rips the cake and you're left turning it into cake pops, trifle, ice cream topping, bread pudding, or the best French toast of your life.
First, make sure that your cake is actually fully baked; insert a tester into the middle and if it comes out clean, you're good to go. If it's gooey, the cake needs more time in the oven — even if that means reheating it. A fully baked cake will pull away from the cake tin, making it easier to turn out.
Then make absolutely sure the cake is properly cooled — a sign indicating when to remove cake from a pan — before attempting to turn it out. This should take 20 to 30 minutes. If time is of the essence, put the cake in the fridge for a short time or invert the pan and put a plate piled with ice cubes on top: With more surface area, it should cool the bottom of your cake more evenly. If none of that works, it's time to do a 180.
There's more than one way to free a cake
If cooling doesn't work or it really was thoroughly cooled the first time, do the exact opposite and heat things up. Pop it back in the oven for a few minutes — not long enough to overbake it, but long enough to create a temperature shift. If the pan was greased or the cake was made with butter, this can loosen it up enough to release the cake.
If you're afraid of overbaking, you can lightly steam it. King Arthur Flour recommends putting a rolled kitchen towel in the sink to create a little nest, pouring boiling water into the sink, and nestling the cake pan into the towel. Tightly cover the cake with foil to help trap steam and avoid a damp, splashed cake. Lay another towel over the top of the sink to trap the steam. After about 15 minutes, try to turn it out again. This tip is specifically for stuck bundt cakes, but should work for all cake pans.
Though it may be tempting to shove some utensils like forks under the cake and pry it out, this can make matters much worse in the future. Many cake pans are designed to be nonstick (whether you believe that or not while your cake is stuck), but scratching the surface will create even more sticking in the future. If you're going to try to pry, use a thin, flexible, silicone or rubber spatula and very carefully apply leverage around the cake.
How to prevent sticking in the first place
If the cake hasn't been baked yet — or you need to make another batch because this one is just too far gone — prevention is best. A well-fitting silicone baking mat is the best reusable option, but the more likely tool to be in your kitchen already is parchment paper. Lining the bottom of your cake pan with parchment paper is your best bet to prevent sticking cakes.
Use the triple threat: grease the pan, lay down parchment paper and grease the parchment paper, and then dust the whole thing with flour, sugar, or cocoa powder. This will reduce the cake's ability to grip the sides. (The exception to this is angel food and chiffon cakes, which need to be able to climb the sides of the pan and cool upside down).
Without parchment paper or with pans that don't accommodate it, like bundt pans, really good greasing and dusting is key. King Arthur recommends greasing a bundt pan right before filling it with batter; with steep sides, a (supposedly) slick finish on the pan, and gravity, the grease can slide down and off the parts that need it most if you do it too early.
To avoid flour patches on your finished cake, though, you can make homemade cake release "goop" with equal parts flour, vegetable oil, and shortening. Smear this all along the cake pan and the cake should pop right out. After cooling for at least 30 minutes, that is.