When seven-year-old Texas boy Jack Swanson donated his savings to assist in the clean-up of a local mosque that had been vandalised, he did not expect anything in return.

But he has now received a generous gift of thanks from the American Muslim Community.

Following his $US20 donation — which he had earned helping out at home, and was saving for an Apple iPad — Jack received a surprise iPad in the post and a letter reading:

"Dear Jack, you had saved $20 in your piggybank for an Apple iPad. But then a local Islamic mosque was vandalised. So you donated your $20 to this local Texas mosque because of your amazing generosity and kind heart. Please enjoy this Apple iPad with our sincere thanks. Love the American Muslim Community."

The editor of the Islamic Monthly Magazine, Araslan Iftikar — who put out a call on Facebook looking for Jack's parents and has since posted about him receiving the gift — appears to be behind the present, the Telegraph reported.

Earlier this week, the Islamic Centre of Pflugerville (ICP) was found defaced with smeared faeces and torn pages from the Quran, an incident police are treating as a hate crime, local television station KXAN reported.

Jack's mother Laura Swanson said Jack was upset when he heard about what had happened, and after talking to his mother decided to donate his savings to help with the clean up costs.

"We were talking in the car how someone smeared poop on their church and that was a really, really awful thing to do," Ms Swanson told KXAN.

"We had a good conversation about what churches are for and how everybody's churches are important.

"It's disgusting, it's gross, it doesn't matter what you believe, what I believe, what he believes or anybody believes, all faith is important."

ICP board member Faisal Naeem said Jack's donation gave him hope.

"It's 20 bucks but coming from Jack collecting his pennies, it's worth 20 millions bucks to me and to our community," he told KXAN.

"This gives me hope because this means it's not one versus the other."