Sunnyvale's ban goes into effect Thursday after 66 percent of voters approved it in November.
Another federal judge last month upheld San Francisco's high-capacity magazine ban on similar grounds.
The National Rifle Association filed lawsuits in both cities to overturn the bans, arguing they violate a seminal 2008 U.S. Supreme Court ruling that said every law-abiding citizen has a right to own a gun inside their homes for self-defense purposes.
Both judges cited an NRA study showing that Americans who fired in self-defense squeezed off an average of less than three shots during an attack. Both judges said limiting a magazines capacity to 10 or fewer bullets would not violate the Supreme Court's holding.
Judge Whyte said Wednesday that "it is rare that anyone will need to fire more than 10 rounds in self-defense."
NRA lawyer Chuck Michel said he would appeal both decisions. Michel asked the 9th U.S. Circuit Court Appeals for an emergency order to stop Sunnyvale's ban from taking effect until the appeal is decided.
Several other federal courts across the country have made similar rulings. None have struck down a high-capacity magazine ban.
More Nation & World Headlines
Al-Qaida captures leader of U.S.-backed Syrian rebels California cuts water use by 27 percent George McGovern revealed he had a secret child Pentagon OKs guns to protect stateside troops Man describes finding 777 part on Reunion Island Blue moon? Celestial event comes with a catch U.S. looking for lion-killing Minnesota dentist 3 hurt in emergency evacuation of Boeing MD-80
Our new comment system is not supported in IE 7. Please upgrade your browser here.