In this paper, we test the spherical collapse of a viscous unified dark fluid (VUDF) which has constant adiabatic sound speed and show the nonlinear collapse for VUDF, baryons, and dark matter, which are important in forming the large-scale structure of our Universe. By varying the values of the model parameters $$\alpha $$ and $$\zeta _{0}$$ , we discuss their effects on the nonlinear collapse of the VUDF model, and we compare its result to the $$\Lambda $$ CDM model. The results of the analysis show that, within the spherical top-hat collapse framework, larger values of $$\alpha $$ and smaller values of $$\zeta _{0}$$ make the structure formation earlier and faster, and the other collapse curves are almost distinguished with the curve of $$\Lambda $$ CDM model if the bulk viscosity coefficient $$\zeta _{0}$$ is less than $$10^{-3}$$ .