State legislatures around the country, facing growing public concern about the collection and trade of personal data, have rushed to propose a series of privacy laws, from limiting how schools can collect student data to deciding whether the police need a warrant to track cellphone locations.

Over two dozen privacy laws have passed this year in more than 10 states, in places as different as Oklahoma and California. Many lawmakers say that news reports of widespread surveillance by the National Security Agency have led to more support for the bills among constituents. And in some cases, the state lawmakers say, they have felt compelled to act because of the stalemate in Washington on legislation to strengthen privacy laws.

“Congress is obviously not interested in updating those things or protecting privacy,” said Jonathan Stickland, a Republican state representative in Texas. “If they’re not going to do it, states have to do it.”

For Internet companies, the patchwork of rules across the country means keeping a close eye on evolving laws to avoid overstepping. Many companies have an internal team to deal with state legislation. And the flurry of legislation has led some companies, particularly technology companies, to exert their lobbying muscles — with some success — when proposed measures stand to harm their bottom lines.