Aiming at the problem that the maximum Error Controllable compression based on SVD (EC-SVD) algorithm can not make full use of spectral vectors redundancy in hyperspectral image, a hyperspectral image compression algorithm with maximum error controlled based on clustering is presented in this paper, by combining hyperspectral image compression with clustering. It is found that a higher compression ratio can be achieved as spectral vectors similarity increases. Using the K-means clustering algorithm, the pixels of hyperspectral image are clustered by spectral vectors to improve the similarity of spectral vectors in the same class. Then, the pixels in each class are compressed using the idea of EC-SVD algorithm. And it is shown that the compression ratio increases if the cluster number is no more than 8 and the number of pixels is larger than that of bands in the clustered hyperspectral image. Finally, a total simulation procedure of the improved compression algorithm is designed and some hyperspectral images are tested. The results of the tests show that compression ratios and signal to noise ratios are higher than those of EC-SVD algorithm under the same parameters; the maximum compression ratio rises around 10 percent. The presented improved algorithm can raise the compression efficiencies of hyperspectral images.