Hyperspectral image is well-known for the identification of the objects on the earth's surface. Most of the classifier uses the spectral features and does not consider the spatial features to perform the classification and to recognize the various objects on the image. In this paper, the hyperspectral image is classified based on spectral and spatial features using a convolutional neural network (CNN). The hyperspectral image is divided into a small number of patches. CNN constructs the high level spectral and spatial features of each patch, and the multi-layer perceptron helps in the classification of image features into different classes. Simulation results show that CNN archives the highest classification accuracy of the hyperspectral image compared with other classifiers.