This paper presents a hybrid indoor positioning system based on the combination of IEEE 802.11 (Wi-Fi) fingerprinting and magnetic matching (MM) which uses the built-in sensors on a smartphone. These sensors have made smartphones become ubiquitous portable devices providing not only communication services in everyday life but also personal positioning uses. The main reason of using Wi-Fi signals as fingerprints is that Wi-Fi access points are commonly distributed in indoor environments and are the basic devices in smartphones. On the other hand, the concrete building frame causes perturbations in indoor magnetic field and thus formed in each building unique distribution. We can then make use of this unique magnetic distribution through a specific algorithm to acquire a more accurate indoor positioning result. In general, MM results might have small errors on some occasions, and it might suffer from significant mismatches. Hence, it is important to utilize other technologies to detect these mismatches. If two positioning techniques could be integrated, then the combined positioning performance could be improved than that of Wi-Fi fingerprinting or MM alone. The concept of the Wi-Fi fingerprinting is to use the received signal strength (RSS) value as a tag of the user position, and it requires two stages to carry out the fingerprinting method including the calibration (i.e., training) stage and the verification (i.e., positioning) stage. In this paper the positioning algorithm for the Wi-Fi fingerprinting algorithm is the k-weighted nearest neighbors (KWNN) algorithm. On the other hand, the concept of MM is similar to that of Wi-Fi fingerprinting, which is divided into two steps: first, the offline training step, a set of reference points with known coordinates and the corresponding magnetic intensities are stored into the. Second, the positioning step is implemented to find the optimal match between the features of the measured magnetic profile and the database. Since MM is a profile-matching method, we utilize the dynamic time warping algorithm to address the real-time step-length estimation. All the work is implemented on an off-the-shelf portable smart device, and the 1st floor of Department of Aeronautics and Astronautics building at National Cheng Kung University as well as a warehouse test field in Tainan City, Taiwan are used as examples to demonstrate this proposed hybrid indoor positioning system. The experimental results including the positioning error statistics of the Wi-Fi fingerprinting, MM, and Wi-Fi fingerprinting/MM integration are evaluated in the paper. As shown in the experimental results, the positioning performance of this proposed hybrid indoor positioning system is improved than that of Wi-Fi fingerprinting or MM alone.