Ed Sheeran is amazed by the lengths his friend Harry Styles will go to help people.

The Grammy-nominated British singer and the One Direction crooner often spend time together.

UK newspaper The Mirror reports that Ed was particularly moved by a recent charitable action that Harry made.

“We were in LA about three months ago and he had a day off,” Ed recalled.

"He spent two or three grand on Domino’s pizza and drove around giving them out to homeless people. That’s an amazing story.

“People write about Harry in a negative way because of his love life but he does stuff like that a lot. He’s a pretty genuine guy.”

Apparently Harry appreciates his new-found wealth and “doesn’t take it for granted at all.”

Although the “generous” musician can afford mansions, it seems that he isn’t too humble to crash on his friends’ couches.

“He lived at my flat for a while. He had two very posh houses in London but he’d just come and stay,” Ed said.

“He just lives at his mates’ houses. It’s cool as he gets to see his friends every day. And you wouldn’t want to be in a big house on your own.”

Harry’s band One Direction created upcoming single One Way Or Another to benefit UK charity Comic Relief.

The track will be available for download on February 17.