Tired of waiting for Congress to pass comprehensive privacy legislation, state lawmakers are taking matters into their own hands, and not a moment too soon. Legislatures across the country have enacted laws to regulate the kinds of information that companies and law enforcement agencies can collect about individuals and how it can be done.

Businesses ranging from social networking services to little-known data brokers collect all kinds of information about consumers, often without their knowledge or permission. The data includes basic details like what websites people visit, what they purchase online and in retail stores and whom they interact with. The information is most commonly used to help businesses deliver targeted ads, but it can also be amassed into detailed profiles for purchase by anybody, including potential employers.

In Washington, lobbyists from technology, marketing and related industries have effectively put the brakes on privacy protection legislation. Lawmakers have done nothing to advance a consumer privacy bill of rights that President Obama proposed in 2012, which would have allowed consumers to restrict the data collected and required businesses to give individuals access to files about them. And despite the Federal Trade Commission’s support for a “do-not track” option on Internet browsers that could prevent advertisers from monitoring consumers online, it has not been implemented.

This is why more than 10 states have passed more than two dozen state privacy laws just this year, as reported in The Times by Somini Sengupta. Texas passed a bill that would force police to get a warrant to look at emails — a similar federal bill was approved by the Senate Judiciary Committee in April but has not come to a vote in the Senate. California made it illegal to publish the nude pictures of someone online without his or her consent. Other states have restricted the use of drones for surveillance.