Ultra-wideband (UWB) sensor technology is known to achieve high-precision indoor localization accuracy in line-of-sight (LOS) environments, but its localization accuracy and stability suffer detrimentally in non-line-of-sight (NLOS) conditions. Current NLOS/LOS identification based on channel impulse response's (CIR) characteristic parameters (CCP) improves location accuracy, but most CIR-based identification approaches did not sufficiently exploit the CIR information and are environment specific. This paper derives three new CCPs and proposes a novel two-step identification/classification methodology with dynamic threshold comparison (DTC) and the fuzzy credibilitybased support vector machine (FC-SVM). The proposed SVM based classification methodology leverages on the derived CCPs obtained from the waveform and its channel analysis, which are more robust to environment and obstacles dynamic. This is achieved in two-step with a coarse-grained NLOS/LOS identification with the DTC strategy followed by FC-SVM to give the fine-grained result. Finally, based on the obtained identification results, a real-time ranging error mitigation strategy is then designed to improve the ranging and localization accuracy. Extensive experimental campaigns are conducted in different LOS/NLOS scenarios to evaluate the proposed methodology. The results show that the mean LOS/NLOS identification accuracy in various testing scenarios is 93.27 %, and the LOS and NLOS recalls are 94.27 % and 92.57 %, respectively. The ranging errors in LOS(NLOS) conditions are reduced from 0.106 m(1.442 m) to 0.065 m(0.739 m), demonstrating an improvement of 38.85 %(48.74 %) with 0.041 m(0.703 m) error reduction. On the other hand, the average positioning accuracy is also reduced from 0.250 m to 0.091 m with an improvement of 63.49 %(0.159 m), which outperforms the state-of-the-art approaches of the Least-squares support vector machine (LS-SVM) and K-Nearest Neighbor (KNN) algorithms.