Yes, you can use margarine instead of butter in recipes. However, keep in mind that the taste and texture will be different, and you may need to make adjustments to the recipe accordingly.