SummaryIn this paper, a received signal strength indicator (RSSI)‐based weighted centroid localization (WCL) method for indoor corridor scenarios is developed and tested. The contribution of the proposed system is that, to scope the area of an unknown target position, the possible corridor area where the target node should be located is automatically selected, and only reference nodes deployed in such an area are applied for position estimation. Additionally, to improve the estimation precision, distance values converted from measured RSSIs and used for the WCL are also compensated to alleviate the RSSI variation problem caused by physical environments. Therefore, our methods can save a number of reference nodes to be used, while localization accuracy can also be achieved. Experiments in the corridor environment using a 2.4 GHz IEEE 802.15.4 wireless sensor network with four reference nodes deployed in the test field dimension of 22 m × 9.3 m have been performed. Experimental results demonstrate that the proposed method, which requires only two reference nodes, outperforms the original WCL method with four reference nodes by 53.053%, as indicated by average localization errors. The results also reveal that the proposed method provides error distances lower than the WCL method for all test target positions, while all estimated positions fall within the corridor areas by 100%.