Allah, exalted be His praise, says: "And We sent down from the sky pure (purifying) water." [Surah al-Furqan: 48]
And He said: "Then if you do not find water, perform tayammum with clean earth." [Surah al-Nisa: 43]
Abu Abdullah Muhammad bin Idris al-Shafi'i (may Allah be pleased with him) said: "The apparent meaning of the Qur'an indicates that all water is pure, whether it is sea water or other than it, and a hadith has been narrated from the Prophet (peace and blessings be upon him) on this matter which agrees with the apparent meaning of the Qur'an; (however,) in its chain there is a narrator whom I do not know." Then he mentioned the hadith that follows.
Sayyiduna al-Mughirah bin Abi Burdah heard Sayyiduna Abu Hurayrah (may Allah be pleased with him) say that a man asked the Messenger of Allah (peace and blessings be upon him): O Messenger of Allah! We travel by sea and take a small amount of water with us; if we perform ablution with it, we will remain thirsty. May we perform ablution with sea water? The Messenger of Allah (peace and blessings be upon him) said: "Yes, its water is pure and its dead (animals) are lawful."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1