Let $G=(V,E)$ be a simple graph. A set $Ssubseteq V$ isindependent set of $G$, if no two vertices of $S$ are adjacent.The independence number $alpha(G)$ is the size of a maximumindependent set in the graph. In this paper we study and characterize the independent sets ofthe zero-divisor graph $Gamma(R)$ and ideal-based zero-divisor graph $Gamma_I(R)$of a commutative ring $R$.