Indoor localization using WiFi signal parameters is challenging, with encouraging decimeter localization results available with enough line-of-sight coverage and hardware infrastructure. This paper proposes a new 2-dimensional multiple packets based matrix pencil (2D M-MP) method to estimate the Angle of Arrival (AoA) and Time of Flight (ToF) based on WiFi channel state information (CSI). Compared with the conventional parameter estimation algorithms, this method has two advantages. First, 2D M-MP method uses the discrete Fourier transform (DFT) to convert the complex computation into real computation to reduce the computational complexity significantly without losing accuracy. Second, it accumulates multiple CSI packets to improve the parameter estimation accuracy effectively, especially at low values of signal-to-noiseratio (SNR) environment. To verify the practicability of our proposed 2D M-MP method, we set up a localization system in an actual scenario using commodity WiFi cards which demonstrates that the performance of 2D M-MP method is better than conventional parameter estimation algorithms and can achieve a localization accuracy of 42 cm in indoor hall deployment.