Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) reports this as a marfu' hadith: (The Prophet (peace and blessings be upon him) said:) "A man says something by which he intends nothing harmful; he only intends to make some people laugh with it. Yet because of it he will fall (into Hell from a height) greater than the distance of the sky."
Ahmad recorded it, and its narrators have been declared trustworthy despite weakness in some of them.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الزهد / 18138