foul implies extreme offensiveness and an accumulation of what is rotten or stinking. nasty applies to what is actually foul or is repugnant to one expecting freshness, cleanliness, or sweetness. In practice, nasty is often weakened to the point of being no more than a synonym of unpleasant or disagreeable. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.