Colorectal cancer is the most common cancer worldwide in the third. Detection of colon cancer is an essential task for the histopathologist as they have to analyze the morphology of the images at different magnifications. In this study, we classified benign and adenocarcinoma using 10000 images of benign colon tissue. We proposed a feature extraction method by the deep convolutional neural network. First, we learn the features of data from ResNet-50 and DenseNet-121. Then, we conduct colon cancer classification by popular classifiers such as SVM, Random Forest, K-Nearest Neighbor, and XGBoost. We evaluated our models on two kinds of testing data (25% and 15% of the whole dataset). In this research, the data was conducted on the Kaggle colon tissue dataset. The experimental results indicate that the extraction of features in DenseNet-121 based architecture leads to higher accuracy, sensitivity, and specificity of ResNet-50 architecture for all classifiers. DenseNet-121 gets about 98.53% and 98.63% with KNN classifier for accuracy and sensitivity, respectively.