The lower House of Deputies had passed the bill earlier, and late Tuesday the Senate gave it a green light. That leaves only the expected signature into law from President Dilma Rousseff.
"The bill sets out principles, guarantees, rights, and duties for Internet users, and Internet service providers" in Brazil, a statement on the Senate's Website said.
The law is aimed at balancing freedom of expression and the Web-users' rights to privacy and protection of personal data, Rousseff says.
Still, Brazilian authorities do not control what happens outside their country; the government-backed law stopped short of requiring companies such as Google and Facebook to store local users' data in Brazilian data centers.
Rousseff has spoken out forcefully against cyber-snooping revealed by US intelligence whistleblower Edward Snowden. The US eavesdropping targeted her staff's communications and those of others at Petrobras, the state oil giant.
US National Security Agency snooping so infuriated her that she canceled a state visit to Washington scheduled for October in protest, and pushed for a UN resolution aimed at protecting "online" human rights.
The trove of documents leaked by Snowden - who now lives in Russia - sparked outrage in the United States and abroad about the vast capabilities of America's intelligence programs.
Following the revelations, US President Barack Obama was forced to propose changes to the electronic surveillance of US citizens, including proposals put forward in March to take bulk phone data collection out of the hands of the NSA.Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.
Samsung Galaxy S26, Galaxy S26+ Hardware Upgrades Spotted in Leaked Comparison With Galaxy S25 Counterparts