The funnel cake — served under a mountain of powdered sugar and any of a number of toppings — is the stuff of fried food legend, and a trip to the fair, carnival or theme park isn’t complete without one. Or the stack of napkins you’ll need to go with it.

For the uninitiated, a funnel cake is a thin cake or pastry batter, traditionally poured through a funnel into a pot of hot oil. As the batter hits the oil, it seemingly takes on a life of its own, squiggling or swirling into odd shapes as the oil bubbles up around it. In minutes, the batter is fried to a crisp golden shell, the inside soft and steamy.

Funnel cakes are commonly traced back to the Pennsylvania Dutch, though similar variations have been found the world over for centuries — cinnamon and sugar-dusted churros from Spain and Mexico, spiral-shaped pastries found in parts of Asia and North Africa, and cruller-type doughnuts in the United States, Germany and other European countries.

Fun as funnel cakes are to enjoy at the fair, the dessert can easily be made at home. It’s the perfect project if you’re looking for something to entertain company or kids — simply set up a toppings bar so guests can decorate their cakes as you fry them.

Some recipes call for a batter leavened with baking powder or soda, some are similar to Dutch babies in the amount of eggs used, still others call for yeast. There are even funnel cake “hacks” that call for nothing more than pancake batter thickened or thinned to the right consistency. After testing a number of recipes, I preferred one that uses pte a choux, or “choux paste,” the same batter used in the making of cream puffs, eclairs, crullers and churros — and the same that Alton Brown uses in his funnel cake recipe. A choux paste-based batter results in an incredibly light funnel cake, airy and delicate on the inside with a thin crust that holds its structure and stays crisp long after it’s been fried.

Bring butter, water, salt, sugar and vanilla seeds to a boil, then vigorously stir in flour to make a paste. Transfer the mixture to a food processor (you could use a stand mixer, but a food processor makes quick work of the dough and will actually increase the volume of the fried cakes, a valuable trick Rose Levy Beranbaum shares in her book “The Pie and Pastry Bible”). Pulse the mixture in the processor, then add eggs and egg whites all at once to form your batter.

The batter will be too thick to pour out of a funnel, but you can pipe it from a pastry bag fitted with a small tip. The pastry bag makes the batter easier to control, and makes much less of a mess than the traditional funnel.

One thing to keep an eye out for is oil temperature. If the oil is too hot, the cakes will burn on the outside before the center has had a chance to fully cook; too cool, and the cakes will soak up the oil rather than frying in it. When the cakes are a rich golden color, drain them on a rack and serve right away.

As for toppings, the sky’s the limit. Powdered sugar is a classic way to start. Then use summer fruit as an inspiration, topping the cake with a mound of macerated fresh berries, or go crazy with caramel sauce, chocolate or maple syrup. A scoop of ice cream provides a nice contrast to the hot cake, and I’ve seen funnel cake ice cream sandwiches.

You could even go the savory route. Substitute French fries with funnel cake for a poutine-inspired meal, or skip the bun and reach for funnel cakes next time you’re craving a cheeseburger. If you’re feeling really ambitious, you could even do something like the foie gras funnel cake chef Tim Hollingsworth serves for brunch at his downtown L.A. restaurant Otium at the Broad museum.

Just don’t forget the stack of napkins.

———

FUNNEL CAKE

Total time: About 1 hour

Makes 6 to 12 funnel cakes, depending on size

6 tablespoons (3/4 stick) butter, cut into 1/2-inch pieces

1 cup water

1/2 teaspoon salt

1/2 teaspoon sugar

Seeds from 1/2 vanilla bean

1 1/4 cups (5.3 ounces) flour

3 eggs

2 egg whites

Canola oil, for frying

Powdered sugar, or other toppings as desired

1. In a medium-size, wide heavy-bottom saucepan, combine the butter, water, salt, sugar and vanilla seeds and bring to a rolling boil over high heat. Remove from heat and quickly stir in the flour (stir quickly or the flour lumps will cook). Return the pan to low heat and cook, stirring frequently, for about 3 minutes to cook the flour slightly and rid the mixture of any starchy, floury taste.

2. Remove the pan from the heat and place the dough in the bowl of a food processor or stand mixer. If using a food processor, process the dough for 15 seconds to cool slightly and release steam (leave the tube open), then add all of the eggs and egg whites at once. Immediately continue to process for 30 seconds to combine and form the cruller batter. If using a stand mixer, beat the dough with the paddle attachment until most of the steam has subsided, then add the eggs and egg whites, 1 at a time, until each is incorporated and a batter is formed.

3. Fill a deep fryer with oil, or fill a large pot to a depth of at least 3 inches, and heat to a temperature of 350 degrees.

4. Meanwhile, place the batter in a pastry bag fitted with a round tip no wider than 1/4-inch in diameter.

5. Bring the pastry bag over the hot oil and push the batter into the hot oil in a zig-zag or spiral shape. Fry no more than 1 large or 2 smaller funnel cakes at a time. Fry the cakes until puffed and golden (they will triple in size), 3 to 5 minutes, depending on size, and flipping every 30 seconds or so.

6. Drain the cakes on a rack and cool slightly, then top as desired.

Each of 12 cakes, without toppings: 241 calories; 4 g protein; 10 g carbohydrates; 0 fiber; 21 g fat; 5 g saturated fat; 68 mg cholesterol; 0 sugar; 125 mg sodium.