With the continuous development and improvement in Internet-of-Things (IoT) technology, indoor localization has received considerable attention. Particularly, owing to its unique advantages, the Wi-Fi fingerprint-based indoor-localization method has been widely investigated. However, achieving high-accuracy localization remains a challenge. This study proposes an application of the standard particle swarm optimization algorithm to Wi-Fi fingerprint-based indoor localization, wherein a new two-panel fingerprint homogeneity model is adopted to characterize fingerprint similarity to achieve better performance. In addition, the performance of the localization method is experimentally verified. The proposed localization method outperforms conventional algorithms, with improvements in the localization accuracy of 15.32%, 15.91%, 32.38%, and 36.64%, compared to those of KNN, SVM, LR, and RF, respectively.