How to make margarine

Margarine on cornbreadFirst of all, in a million years I would never have thought of making margarine. The credit goes to Mattie of Vegan Baking, who did all the heavy lifting by creating an amazing recipe for vegan butter. In fact, six recipes for a variety of vegan butters. Thanks Mattie!

I adapted his recipe to make something more spreadable. If you are baking and want to replicate the properties of butter, by all means use his original recipe.

I first tried making margarine during October Unprocessed, as midway through the month I was craving the creaminess. I also wanted to cut down my plastic tub consumption, and the weekly margarine tubs were the last thing to go. The Husband really likes his margarine, so I couldn’t simply stop buying it.

This recipe makes a margarine that is spreadable at room temperature, although still a bit hard straight from the fridge. But it’s nice and creamy and definitely tastes as good as store-bought margarine. I already stock xanthan gum for my GF baking. Lecithin was the only product that I had to buy, and I can buy it from the bulk store. Store it in a glass jar and only buy small amounts, as it gets weird and sticky if stored in a plastic bag. If you can find it in liquid form, that would be ideal.

Suitable for:

vegan, gluten-free, low-sodium, reduced-sugar diets

Not for:

migraine diets

All of our recipes are gluten-free, sugar-free, and made with plant-based ingredients to help you build a healthy life. Look for midweek posts on meditation, service, and life lessons, helping you create inner balance.

Print Friendly
    • 1
    • 2
    • 3
    • 4
    • 5
    Votes: 0
    Rating: 0
    Rate this recipe!
    How to make margarine
Servings Prep Time Cook Time Passive Time
32 servings of 1 tbsp 10 minutes 5 minutes 30+ minutes


Servings: servings of 1 tbsp


  1. Add the vinegar and salt (if using) to the soy milk with a whisk or a fork and let stand to curdle.
  2. Melt the coconut oil over low heat or in the microwave (if it’s in a glass jar). Pour into the blender and let cool to room temperature.
  3. Add the other oil, the lecithin, and the xanthan gum and turn the blender on high. Blend for about a minute to fully incorporate the lecithin.
  4. Pour in the curdled soy milk while blending, and blend for two minutes more.
  5. Pour into your storage container or molds and put in the freezer until hard. Store in the refrigerator.

Recipe notes

After reading about refined coconut oil (it's highly processed), I now use unrefined organic virgin coconut oil. I don't notice a coconut taste with it, and it's better for us and the environment. I don't think this recipe would work without coconut oil, as it requires an element that will harden at room temperature. Some nutritionists think coconut oil is great for health, others think it's the devil. As with any calorie-dense food, use with moderation. I have not been able to make this without soy products. I have tried five different non-dairy milks (rice, almond, hemp, hazelnut, and coconut) without success.

Share this Recipe


  1. Nancy says

    Thank you for your final comments about what you have tried and has not worked. I am trying desperately to find a margarin I can make my son who is allergic to dairy, soy, coconut and pea proteins. I think your site say end my search. Your honesty has been a huge help to me.

    • says

      You are welcome Nancy! Good luck with it! I know it’s so hard when you are dealing with multiple allergies. If you haven’t checked it out, Cybele Pascale’s blog has some amazing recipes that are free of all the top allergens.

  2. Jen says

    I would really like to try this recipe but I don’t have xanthan gum, can I use arrowroot starch instead? What’s the amount to use? Thanks for your help and sharing :)

    • says

      Jen, I would not recommend arrowroot starch, as this isn’t a cooked recipe and I’m not sure how it would react. You can try it without the xanthan gum, maybe substitute that amount of lecithin, and let us know how it works, okay?

  3. says

    I gave up margarine long ago, but my husband still uses it. I was tired of throwing out those Earth Balance containers, plus, the palm oil…

    I just made this and it is delicious! I can’t wait for my husband to try it!

  4. Maddie says

    Hi! Sorry I’m commenting a year late haha but I have a question about this recipe that may sound silly…is the taste comparable to real butter/margarine? I ask this because I’ve tried several vegan substitutes (Earth Balance, etc.) and they just don’t taste right to me!

    • says

      Hi Maddie, I’m always happy to hear from readers and there are no silly questions. This tastes like a good quality margarine, similar to Earth Balance. The only thing that tastes like butter is… butter. The curded soymilk gives it that dairy-like tang, and it’s very creamy. But no, it won’t fool anyone into thinking it’s butter if you eat it straight.

  5. says

    Dear Steph!

    I like your site and decided today to make this margarine.
    I’ve been looking for granulated soy lecithin for long cause mostly it is sold as pills.

    So, I made the recipe, but the granules didnt solve…There are 2-3mm in diameter big. Do you use the same lecithin or you use powdered?

    PS: I think this recipe will work without it. But you can add just a bit agar agar in the mixture, just to make it stable ;)

    Cheers, Vania!

    • says

      Hi Vania, if you blend it long enough, most granulated lecithin will dissolve. You do need a high-speed blender for that though, which is why I recommend liquid lecithin if you can get it. I do NOT think that agar would work, but if you try it and it does, do let me know! Thanks for the comment.

  6. Emma says

    I can’t use soy. Is there anything that can replace those soy ingredients in this recipe? Thanks so much.

    • says

      Emma, you could try a nut or hemp milk instead of the soy milk and see how well it curdles. If it curdles up and gets thick, give it a go. You can also buy sunflower seed lecithin. Let me know how it all works!

  7. amber says

    Thanks for the recipe!!

    re coconut oil – here is a link showing how it can cure alzheimers :)

    google ‘cbn tv’
    quicksearch: type in coconut oil and click little box to the right – coconut oil touted as Alzheimer’s remedy will appear

    • says

      You can buy lecithin (in bulk or in packages) at most health food stores like Whole Foods or Sprouts. Xanthan gum is a common ingredient in gluten-free baking. It’s kinda pricey but a package lasts me more than a year, as you only use a teaspoon at a time. Will continue to experiment to see if I can make this using something other than these two ingredients, which are pretty highly processed. Stay tuned.

  8. says

    Really interesting Steph. I will have to try this. Just need to get the lecithin. I’ve been using Nutive organic EV unrefined coconut oil (no hexane) and like it. Been wondering how a butter substitute like this would work in making a lemon curd, and using agave instead of sugar or maybe partially. Need to experiment. Thanks.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>