The survey was conducted by Pondering Panda among 1 845 respondents aged between 18 and 34.
It found young people were most likely to believe foreigners living and working in South Africa had a negative impact on the country.
At least 42% believed foreigners were bad for South Africa, compared to 28% who said their presence made no difference, and 24% who believed foreigners had a positive impact on the country.
The survey found that 85% of young people were aware of the recent xenophobic violence in various communities.
Respondents were also asked why they thought people in these communities wanted to drive foreign shop owners away.
It found young people were most likely to think foreign nationals who owned shops were drawing customers away from other businesses, with 42% saying this was why people wanted them to go.
"If this study reflects the attitudes of all South Africans, we have a major problem on our hands," said Pondering Panda spokesperson Shirley Wakefield.
"Xenophobic attacks on shop owners are likely to continue... it is clear that a significant effort is needed from government to educate people about advantages that foreigners can bring to the country," she said.
Respondents also believed that xenophobic violence in the country was on the rise.
In the Free State, nearly two thirds of respondents believed violence would get worse.
Opinions also differed according to region, with over half the Limpopo respondents having a negative opinion of foreigners, followed by Gauteng and the Western Cape.
In the Eastern Cape, 36% believed foreign workers were bad for South Africa. There were no significant differences of opinion across age, gender, or race groups.