You can build a working aquarium filter at home using common materials and basic plumbing parts

A homemade aquarium filter works the same way a commercial one does: water flows through layers of material that trap waste and grow beneficial bacteria. The difference is that you choose the container, the flow rate, and the filter media instead of paying for a brand-name unit. Most DIY filters cost between $20 and $50 in parts and take an afternoon to assemble. They work best in smaller tanks (20 gallons or less) or as a secondary filter in larger ones, because they lack the flow rate and reliability of industrial designs.

The basic design is a plastic container with an inlet tube, an outlet tube, and layers of filter material stacked inside. Water enters at the top, passes down through sponge, charcoal, and gravel, and exits through a tube at the bottom. You'll need a small aquarium pump (the kind that costs $15 to $30) to push water through the system. The whole assembly sits outside the tank or hangs on the back, depending on which style you choose.

Key Takeaways

  • A DIY filter needs a plastic container, an aquarium pump rated for your tank size, inlet and outlet tubes, and filter media in layers (sponge, charcoal, gravel).
  • The pump must move water at a rate that cycles your entire tank volume at least three times per hour—a 20-gallon tank needs a pump rated for 60 gallons per hour or higher.
  • Sponge goes on top to catch large debris, charcoal in the middle to remove odors and discoloration, and gravel at the bottom to grow bacteria.
  • Test the filter before adding it to your tank, and plan to rinse the sponge every two weeks in old tank water to keep flow steady.

Choosing a container and pump size

Start with a clear plastic storage container—the kind sold at hardware stores for $5 to $15. A 10-liter (2.6-gallon) container works for tanks up to 20 gallons; a 20-liter container is better if you want room for thicker filter layers. Avoid metal containers because they rust, and avoid opaque ones because you won't see when the filter clogs. Drill or cut holes in the lid so you can fit tubes through it.

The pump is the most important part. An aquarium pump's flow rate is measured in gallons per hour (GPH). For a 20-gallon tank, you need a pump rated for at least 60 GPH (three times the tank volume per hour). For a 10-gallon tank, 30 GPH is the minimum. Buy a pump slightly larger than the minimum—a 40 GPH pump on a 20-gallon tank is fine, and the extra flow helps the filter stay cleaner longer. Pumps rated for 300+ GPH are overkill for small DIY filters and will push water through too fast for the bacteria to work.

Assembling the filter layers

Stack your filter media from top to bottom in this order: coarse sponge, fine sponge, activated charcoal, and aquarium gravel. Each layer should be 2 to 3 inches thick. The sponges trap visible waste and debris. Charcoal removes discoloration and odors (replace it every month). Gravel at the bottom provides surface area for beneficial bacteria to colonize and acts as a final mechanical filter.

You can buy filter sponges and activated charcoal at any aquarium store for $3 to $8 each. Aquarium gravel is also inexpensive. Do not use charcoal from a barbecue or craft store—it contains additives that leach into the water. Rinse all materials in tap water before adding them to the container.

Cut the sponges to fit snugly inside the container so water cannot bypass them around the edges. Charcoal can be loose or wrapped in a mesh bag. Gravel should fill the bottom 3 inches. The goal is to slow water down as it passes through, giving bacteria time to work and particles time to settle.

Installing inlet and outlet tubes

You'll need two pieces of rigid or flexible aquarium tubing, each about 1/2 inch in diameter. The inlet tube carries water from the pump into the top of the filter. The outlet tube carries filtered water back to the tank. Both are sold at aquarium stores for a few dollars per foot.

Drill or cut two holes in the container lid, one for each tube. The inlet tube should reach nearly to the bottom of the container so water flows down through all the layers. The outlet tube should sit just above the gravel layer so it draws water that has already passed through the filter media. Seal around both tubes with aquarium-safe silicone caulk to prevent water from leaking around them. Let the caulk cure for 24 hours before running water through the filter.

Attach the inlet tube to the pump outlet using a barbed connector (a small plastic fitting that costs less than $1). Attach the outlet tube to the tank using a suction cup or by laying it over the rim. If water leaks at any connection, tighten the tube or use a hose clamp—a small metal band that tightens with a screw.

Testing and running the filter

Before connecting the filter to your tank, fill it with water and run the pump for 10 minutes in a sink or bucket. Watch for leaks around the tubes and the container seams. If water drips from the caulk joints, let them cure longer. If the container itself leaks, it was cracked and you'll need a new one.

Once the test run is complete, drain the filter and place it next to your aquarium. Connect the inlet tube to the pump, place the pump in the tank, and run the outlet tube back into the tank. Turn on the pump and watch the water level in the filter—it should fill slowly and then maintain a steady level as water flows back into the tank. If the outlet tube gurgles or sputters, the filter media is clogged and needs rinsing.

Let the filter run for a week before adding fish or adding more fish to an existing tank. During that week, beneficial bacteria will begin to colonize the gravel layer. After that, the filter is ready to work as part of your tank's ecosystem.

Maintenance and when to replace media

Rinse the sponge layers every two weeks by removing them and squeezing them gently in a bucket of old tank water (never tap water, which kills the bacteria). Do not scrub or wring them hard. The goal is to remove trapped debris without destroying the bacterial colony. Replace the sponges entirely every three months or when they no longer rinse clean.

Replace activated charcoal every month, because it becomes saturated and stops removing odors and discoloration. The gravel can stay in place indefinitely—it is where most of your beneficial bacteria live. If the gravel becomes caked with debris, stir it gently with a stick during a water change, but do not remove it.

Check the pump intake (the part that sits in the tank) every week. If it clogs with algae or debris, the pump will work harder and may overheat. Rinse it in tank water and replace it if it cracks.

When a DIY filter is not enough

A homemade filter works well for small tanks and for keeping water clear, but it has limits. It cannot handle the bioload of a heavily stocked tank or a tank with large, messy fish. If your tank is larger than 30 gallons, has more than a few fish, or has fish that produce a lot of waste (like goldfish or plecos), a commercial filter or a larger DIY filter is a better choice.

A DIY filter also requires more hands-on maintenance than a commercial one. You are responsible for checking flow rate, rinsing media, and replacing charcoal. If you forget, water quality can drop quickly. A commercial filter has a larger media capacity and longer intervals between cleanings, which makes it more forgiving.

Frequently Asked Questions

Can I use a DIY filter on a tank that already has a commercial filter?

Yes. A second filter improves water quality and provides backup if the main filter fails. Run both pumps at the same time. The two filters will not interfere with each other as long as the combined flow rate does not create too much current for your fish.

What happens if the pump stops working?

Water quality will decline over the next few days as waste accumulates. Fish may become stressed. Keep a spare pump on hand, or use the DIY filter as a backup to a commercial filter so you have time to replace a broken pump before fish are harmed.

Can I use sand instead of gravel in the filter?

Sand clogs more easily than gravel and will reduce water flow. If you want to use sand, use it only as the bottom layer (1 inch) and keep gravel above it. Rinse the sand layer more often to prevent clogging.

How do I know if the filter is working?

Water should flow steadily from the outlet tube back into the tank. If flow slows or stops, the sponge is clogged and needs rinsing. Water clarity should improve over the first week. If the tank stays cloudy after a week, the filter media may be saturated and need replacement.

Do I need to add beneficial bacteria to the filter?

No. Bacteria will colonize the gravel naturally over one to two weeks. Commercial bacterial supplements can speed this up, but they are not necessary if you are patient and do not overstock the tank during the first week.