Pope Francis has encouraged young people to "be dreamers" and believe in a "new humanity" at the closing mass of World Youth Day in a village near Krakow, Poland, on Sunday.

The Pope told a crowd of hundreds of thousands that God is "always cheering us on" and that our "real stature" in life is as His beloved children.

"People may judge you to be dreamers, because you believe in a new humanity, one that rejects hatred between peoples, one that refuses to see borders as barriers and can cherish its own traditions without being self-centred or small-minded," he said, adding that they should not be discouraged but "with a smile and open arms, you proclaim hope and you are a blessing for our one human family".

In a message littered with references to social media and the use of technology, the Pope also told those gathered not to "stop at the surface of things" and to "distrust the worldly cult of appearances". "Instead, 'download' the best 'link of all, that of a heart which sees and transmits goodness without growing weary," he said.

He urged those gathered to make prayer a priority in all the 'contacts' and 'chats' they have each day and said that God is interested not in merely recording who we are but in transforming us: "Trust the memory of God: his memory is not a 'hard disk' that 'saves' and 'archives' all our data, but a heart filled with tender compassion, one that finds joy in 'erasing' in us every trace of evil."

More than 2.5 million people reportedly attended the final events of the week long World Youth Day including Sunday's mass and an evening vigil on Saturday night where the Pope had urged “drowsy and dull kids who confuse happiness with a sofa” to get up and live their life. On what was the Pope's first visit to Eastern Europe, he also toured the former Nazi concentration camp at Auschwitz and met with Holocaust survivors.

The Pope announced at the next World Youth Day will be held in Panama in 2019.