Yes, you can use aluminum foil if you don’t have cupcake liners. Cut your foil into squares or circles that are about 1 inch larger than the circumference of your muffin pan cavities. Gently mold the foil pieces into the muffin tin cavities. Grease the foil with some cooking spray. Add your cupcake batter.