<p>Tin-silver alloy electroplating baths having certain amine-oxide surfactants and methods of electrodepositing a tin-silver-containing layer using these baths are disclosed. Such electroplating baths are useful to provide tin-silver solder deposits having reduced void formation and improved within-die uniformity.</p>