Background Multivoxel pattern analysis has provided new evidence on somatotopic representation in the human brain. However, the effects of stimulus modality (e.g., penetrating needle versus non-penetrating touch) and level of classification (e.g., multiclass versus binary classification) on patterns of brain activity encoding spatial information of body parts have not yet been studied. We hypothesized that performance of brain-based prediction models may vary across the types of stimuli, and neural patterns of voxels in the SI and parietal cortex would significantly contribute to the prediction of stimulated locations. Objective We aimed to (1) test whether brain responses to tactile stimuli could distinguish among stimulated locations on the body surface, (2) investigate whether the stimulus modality and number of classes affect classification performance, and (3) localize brain regions encoding the spatial information of somatosensory stimuli. Methods Fifteen healthy participants completed two functional magnetic resonance imaging (MRI) scans and were stimulated via the insertion of acupuncture needles or by non-invasive touch stimuli (5.46-sized von Frey filament). Participants received the stimuli at four different locations on the upper and lower limbs (two sites each) for 5 min while blood-oxygen-level-dependent activity (BOLD) was measured using 3-Tesla MRI. We performed multivariate pattern analysis (MVPA) using parameter estimate images of each trial for each participant and the support vector classifier (SVC) function, and the prediction accuracy and other MVPA outcomes were evaluated using stratified five-fold cross validation. We estimated the significance of the classification accuracy using a permutation test with randomly labeled training data (n = 10,000). Searchlight analysis was conducted to identify brain regions associated with significantly higher accuracy compared to predictions based on chance as obtained from a random classifier. Results For the four-class classification (classifying four stimulated points on the body), SVC analysis of whole-brain beta values in response to acupuncture stimulation was able to discriminate among stimulated locations (mean accuracy, 0.31; q < 0.01). The searchlight analysis found that values related to the right primary somatosensory cortex (SI) and intraparietal sulcus were significantly more accurate than those due to chance (p < 0.01). On the other hand, the same classifier did not predict stimulated locations accurately for touch stimulation (mean accuracy, 0.25; q = 0.66). For binary classification (discriminating between two stimulated body parts, i.e., the arm or leg), the SVC algorithm successfully predicted the stimulated body parts for both acupuncture (mean accuracy, 0.63; q < 0.001) and touch stimulation (mean accuracy, 0.60; q < 0.01). Searchlight analysis revealed that predictions based on the right SI, primary motor cortex (MI), paracentral gyrus, and superior frontal gyrus were significantly more accurate compared to predictions based on chance (p < 0.05). Conclusion Our findings suggest that the SI, as well as the MI, intraparietal sulcus, paracentral gyrus, and superior frontal gyrus, is responsible for the somatotopic representation of body parts stimulated by tactile stimuli. The MVPA approach for identifying neural patterns encoding spatial information of somatosensory stimuli may be affected by the stimulus type (penetrating needle versus non-invasive touch) and the number of classes (classification of four small points on the body versus two large body parts). Future studies with larger samples will identify stimulus-specific neural patterns representing stimulated locations, independent of subjective tactile perception and emotional responses. Identification of distinct neural patterns of body surfaces will help in improving neural biomarkers for pain and other sensory percepts in the future.