Nobel Peace Prize laureate Malala Yousafzai has described as "cruel" a policy launched by US President Donald Trump to separate children of illegal immigrants from their families, during her first visit to South America to promote girls' education.

More than 2,300 children were separated from their parents after the Trump administration began a "zero tolerance" policy on illegal immigrants in early May, seeking to prosecute all adults who cross the border illegally from Mexico into the United States.

Trump stopped separating families last month following public outrage and court challenges.

"This is cruel, this is unfair and this is inhumane. I don't know how anyone could do that," Yousafzai told Reuters on Wednesday.

"I hope that the children can be together with their parents."

Her stern words contrasted with her effusive praise last year for Canada's embrace of refugees under Prime Minister Justin Trudeau. At the World Economic Forum in Davos this year, Malala also questioned Trump's record on women's rights.

Yousafzai, known widely by her first name, was visiting Rio de Janeiro to kick off the expansion of her education charity, the Malala Fund, into Latin America, starting with Brazil.

Her aim in Brazil, Latin America's largest economy, is to advocate for more public spending on education, a tall task after the country passed a constitutional amendment freezing federal spending in real terms for two decades in order to reduce public debt.

She also hopes to get an estimated 1.5 million girls currently not in school into the classroom, with a special focus on minority groups who lag white children on key indicators like literacy and secondary school completion.

"It is important for us to reach the indigenous and the Afro-Brazilian population in Brazil. Those girls are facing many challenges," Malala said in an interview.

In 2014, Malala was made the world's youngest Nobel laureate, honoured for her work with her foundation, a charity she set up to support education advocacy groups with a focus on Pakistan, Nigeria, Jordan, Syria and Kenya.

Earlier this year, the 20-year-old returned home to Pakistan for the first time since a Taliban gunman shot her in the head in 2012 over her blog advocating girls' education.