Answered by Sidi Moustafa Elqabbany
I kept four goldfish in a tank in my front room. The goldfish were small, measuring approximately four centimetres in length. The tank was also small; it held approximately fifteen litres of water. As my fish swam around, they ejected their bodily waste into the water, which, after a while, became invisible. Is this water religiously impure/filthy? Is the carpet upon which the water dripped impure? And, what if I can no longer see or remember where the water dripped? Is my prayer valid on such a carpet? Is it permissible to fry up the fish and have them in a sandwich?

Preliminaries
This question covers topics regarding purity and filth, as well as the permissible and impermissible regarding food.
Answer
Fish waste is religiously impure, and must be washed away like any other filth. However, there are some cases where it is pardonable (ma’fu). One example of this is when fish waste falls into a tank or well of water in which they were placed, provided they were not placed there for vanity. Putting fish in a tank to merely see what they’ll do is considered vanity. (This is as opposed to putting them in a well so that it doesn’t develop a stench.) So unless you kept goldfish for a better reason than mere observation, their waste has contaminated the water (since it is less than qullatayn), regardless of whether or not the water underwent any noticeable change.
If filthy water drips on your carpet, then the carpet is contaminated as well. Since one of the conditions of prayer is the ritual purity of everything with which you are in direct contact, prayer on such a carpet would be invalid. However, one can always purify the carpet or wait for it to dry completely and place a clean towel over the contaminated area before praying.
If you lose track of filth (such as the carpet, in this case), then if the contaminated area is large, you can pray anywhere on it. If the contaminated area is small, then you must wash the entire area, pray elsewhere, or put a barrier overtop of it that doesn’t allow the filth to come into direct contact with you or anything attached to you (such as your clothing). The meaning of asmall area is one that is big enough for you to pray in, and a large area is anything larger than this.
In order to fry up the fish, you first have to wash off their external surface, since they’ve been swimming around in filth. After that, if they are small, it is permissible to fry, grill, or swallow them whole, even while alive. The filth that is inside a small fish’s abdomen is not forbidden (or disliked) to consume and does not contaminate the fat used to fry it. Note that this is only true in the case of small fish.
References
Tuhfa Al-Muhtaj with Hawashi/Kitab Ahkam Al-Tahara
http://feqh.al-islam.com/Display.asp?Mode=0&MaksamID=1&DocID=69&ParagraphID=46&Diacratic=1
Tuhfa Al-Muhtaj with Hawashi/Kitab Ma Yahill wa Yahrum Min Al-At`ima
http://feqh.al-islam.com/Display.asp?Mode=0&MaksamID=1&Sharh=1&DocID=69&ParagraphID=3584&Diacratic=1
(Note: it is possible that the above e-references expire after some time due to a reorganization of the blessed Feqh Al-Islam site. I have found that old bookmarks sometimes jump to the wrong section of the given books after some time.)
Al-Jurdani, Muhammad ibn Abdullah. Fath al-Allam bisharh Murshid Al-Anam. 4 vols. 1408/1988. Reprint. Cairo: Dar as-Salam.
Allah the Exalted knows best and He alone gives success.
Moustafa Elqabbany
Metro Vancouver, Canada