A simple and convenient method for the synthesis of gold, silver and their alloy nanoparticles in a foam matrix using the protein bovine serum albumin (BSA) is reported. BSA is an excellent foaming agent and,by virtue of its zwitterionic character at the protein isoelectric point, may be used to bind to either cationic silver (Ag+) or anionic gold (AuCl4 -) ions in the foam. The metal ions in the foam are thereafter reduced in situ to yield silver and gold nanoparticles. The versatility of an amphoteric foaming agent is further demonstrated by the simultaneous binding of Ag+ and AuCl4- ions with zwitterionic BSA leading to the possibility of obtaining Au-Ag alloy nanoparticles in the foam. The BSA molecules coat and stabilize the nanoparticles thus prepared eliminating the necessity of employing an additional stabilizing agent in the experimental recipe.