In this study, we determined the effectiveness of removal of nutrients (nitrates and orthophosphates) from greenhouse wastewaters (GW) using non-cross-linked chitosan (CHs) and chitosan cross-linked with epichlorohydrin (CHs-ECH) in the form of hydrogel beads. GW used in the study had the following parameters: N-NO3 621.1 mg/L, P-PO4 60.8 mg/L, SO42− 605.0 mg/L, Cl− 0.9 mg/L, Ca2+ 545.0 mg/L, Mg2+ 178.0 mg/L, K+ 482.0 mg/L, hardness 113° dH, and pH 6.2. The scope of the study included determination of the effect of pH on wastewater composition and effectiveness of nutrient sorption, analyses of nutrient sorption kinetics, and analyses of the effect of sorbent dose on percentage removal of nutrients from GW. CHs-ECH was able to sorb 79.4% of P-PO4 and 76.7% of N-NO3 from GW, whereas CHs to remove 92.8% of P-PO4 and 53.2% of N-NO3.Electronic supplementary materialThe online version of this article (10.1007/s11356-018-2078-z) contains supplementary material, which is available to authorized users.