This study presents a new density filter for a pipe-shaped structure and its application to fluid topology optimization. A simple and straight pipe-shaped structure for fluid is preferred for many engineering purposes rather than the perplex manifold structure provided by the topology optimization method. To determine an optimal pipe structure for fluid, we develop a new density filter and apply it to fluid topology optimization. Hence, the original spatially varying design variables of the fluid topology optimization are modified based on the pipe density filter. Subsequently, the filter design variables, including a uniform pipe wall thickness and adjusted cross-section, are used for artificial pseudo-rigid bodies in fluid topology optimization. An additional constraint is imposed to maintain a nearly uniform pipe thickness. Several numerical examples are solved to demonstrate the validity of the present pipe density filter for fluid topology optimization problems minimizing the energy dissipation of the fluid and controlling the particles suspended in the fluid.