In this paper, a grid-based indexing method for content-based image retrieval (CBIR) is proposed to improve the retrieval performance. To develop a general retrieval scheme which is less dependent on domain-specific knowledge, the features of an image are extracted from its color histograms. In establishing database, quantization technique is applied to quantize the feature vector of each database image, such that the feature space is partitioned into a finite number of grids, each of which corresponds to a grid code (GC). On querying an image, a reduced set of candidate images which have the same GC (or adjacent GCs) as that of the query image is obtained. In the fine matching stage, only the remaining candidates need to be computed for the detailed similarity comparison. The experimental results show that the proposed method leads to a fast retrieval with good accuracy.