What is the relation between spin squeezing and entanglement? To clarify this, we derive the full set of generalized spin squeezing inequalities for the detection of entanglement. These are inequalities for the mean values and variances of the collective angular momentum components J_k. They can be used for the experimental detection of entanglement in a system of spin-1/2 particles in which the spins cannot be individually addressed. We present various sets of inequalities that can detect all entangled states that can be detected based on the knowledge of: (i) the mean values and variances of J_k in three orthogonal directions, or (ii) the variances of J_k in three orthogonal directions, or (iii) the mean values of J_k^2 in three orthogonal directions or (iv) the mean values and variances of J_k in arbitrary directions. We compare our inequalities to known spin squeezing entanglement criteria and discuss to which extent spin squeezing is related to entanglement in the reduced two-qubit states. Finally, we apply our criteria for the detection of entanglement in spin models, showing that they can be used to detect bound entanglement in these systems.