With the rapid development of indoor locationbased services (LBSs), the demand for accurate localization keeps growing as well. To meet this demand, we propose an indoor localization algorithm based on graph convolutional network (GCN). We first model access points (APs) and the relationships between them as a graph, and utilize received signal strength indication (RSSI) to make up fingerprints. Then the graph and the fingerprint will be put into GCN for feature extraction, and get classification by multilayer perceptron (MLP).In the end, experiments are performed under a 2D scenario and 3D scenario with floor prediction. In the 2D scenario, the mean distance error of GCN-based method is 11m, which improves by 7m and 13m compare with DNN-based and CNN-based schemes respectively. In the 3D scenario, the accuracy of predicting buildings and floors are up to 99.73% and 93.43% respectively. Moreover, in the case of predicting floors and buildings correctly, the mean distance error is 13m, which outperforms DNN-based and CNNbased schemes, whose mean distance errors are 34m and 26m respectively.