Representatives voted 78-17 to approve the bill, sending it to the Senate for consideration.
Some Democrats said they opposed the proposal over worries of too few affordable drug treatment programs, noting some rural areas have none.
"There are no safeguards to help people," said Rep. Vanessa Summers, D-Indianapolis. "We don't know that in the 92 counties of Indiana whether or not there's a treatment plan or treatment program for them."
The bill's sponsor, Rep. Jud McMillin, R-Brookville, said it was aimed at helping those with drug abuse problems and improving the home environment for children exposed to parents and others who abused drugs.
McMillin said welfare agency workers would provide those who fail the drug tests with information about available treatment programs and provisions of the bill would allow them to still receive benefits as long as they stuck with treatment. He said those failing the drug tests would be responsible for paying treatment costs, but maintained that would be better than spending money from welfare benefits on buying illegal drugs.
The maximum benefit payment from Indiana's TANF program for a family of four is $346 a month, according to state figures. McMillin said federal laws won't allow drug testing for those receiving food stamps and Medicaid.
"They're the people who need the most help," McMillin said. "This is designed to get them help."
The results of the drug test couldn't be used for a criminal investigation, although child welfare authorities would be notified if a parent or guardian fails a test.
The nonpartisan Legislative Services Agency estimates it would cost about $1.2 million to start the testing program, although McMillin said he believed much of that would go for initial expenses and be less in later years.
The Republican-dominated House last week rejected efforts by Democrats to have legislators face drug tests. McMillian said that effort was a distraction and its supporters could offer it as a separate bill.
Rep. David Niezgodski, D-South Bend, said he believed it was hypocritical not to have legislators undergo the testing and questioned spending so much money on the program when millions of dollars have been cut from state programs.
"When did we open up the faucet?" he said. "I think this is bad precedent."