The Vin is way too high for a 7812. You are going to need an additional R/C filter stage ahead of it. The max Vin for three terminal regulators usually runs about 35V.