The Senate voted 27-1 to pass the bill, and sent it to Gov. Gary Herbert for his signature. The House earlier passed it on a 51-22 vote.
Lee McCashland, panhandling along 400 South Thursday, applauded the move.
"I think it's a good idea," he said when told of the bill. "Ninety-nine percent of us out here are panhandling for drugs or alcohol."
The Senate listened to a quick explanation of the bill, but had no debate on it.
Earlier in the House, Rep. Jim Nielson, R-Bountiful, sponsor of the bill, said it was requested by the Downtown Alliance and the Salt Lake Chamber of Commerce, and replaces a law recently struck down as discriminatory. He said businesses feel it is necessary to make shoppers feel safe, and to avoid tragedy with people in roadways.
He said it affects panhandlers, but also any activity along roadways and off sidewalks which he said could include honk and waves and fill-the-boot drives. "It does not distinguish between the types of conduct," he said.
The bill also outlaws "aggressive panhandling" within 10 feet of the entrance of a bank or automated teller machine.
Leah Hogsten contributed to this report.