Yes, mayonnaise is a substitute for butter, but it is dairy-free. Use it for savory meals, such as mashed potatoes or a spread from sandwiches and crackers. It pairs well with strong, sweet flavors like chocolate. Substitute the butter in a chocolate cake recipe to add moisture and decadence.