Monodispersed $$\hbox {Co}_{3}\hbox {O}_{4}$$ Co3O4 nanocubes were prepared by a simple hydrothermal route with sodium pentanesulphonate, employing $$\hbox {Co}(\hbox {NO}_{3})_{2} \cdot 6\hbox {H}_{2}\hbox {O}$$ Co(NO3)2·6H2O and $$\hbox {NH}_{3} \cdot \hbox {H}_{2}\hbox {O}$$ NH3·H2O (28 wt%) as the starting reactants. The final product was characterized by powder X-ray diffraction, energy-dispersive X-ray spectrometry, scanning electron microscopy and transmission electron microscopy. The as-prepared $$\hbox {Co}_{3}\hbox {O}_{4}$$ Co3O4 nanocubes could photocatalytically degrade organic dye Rhodamine B under irradiation of 365 nm ultraviolet light.