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
Drivers on drugs: Study links roadway accidents to legalization of marijuana S. Sudan president, rebel leader trade blame for fighting GOP: Planned Parenthood spends federal money on politics Obama says fight against Islamic State group will take time Congress: U.S. fails to stop most people trying to join ISIS Yemen officials: Death toll from strikes on wedding at 131 CIA pulled officers from Beijing after breach of federal personnel records Maine college researchers discover new microscopic organism
Our new comment system is not supported in IE 7. Please upgrade your browser here.