Background: Gut mucosa-associated microbiota correlates better with disease phenotypes than fecal microbiota, but the sampling via tissue biopsy is more invasive and uncomfortable. Rectal swab may be a suitable substitute for tissue biopsy, but their effectiveness is controversial. This study aims to evaluate the differences in the microbiota at these sites in patients with inflammatory bowel disease (IBD). Methods: IBD patients and a control group were enrolled when surveillance colonoscopy was scheduled. Samples of colon biopsy tissues, rectal swabs during colonoscopy, and feces before bowel preparation were collected for analyzing microbial composition. To explore the short-term effects of bowel preparation on swab microbiota, pre-preparation swab samples were also collected from 27 IBD patients. Results: A total of 33 Crohn’s disease (CD), 54 ulcerative colitis (UC), and 21 non-IBD patients were enrolled. In the beta diversity analysis, fecal microbiota differed clearly from swab and tissue microbiota in the three disease groups. The swab microbiota was closer to, but still different from, the tissue microbiota. Consistently, we identified several differentially abundant genera between the swab and tissue sites. The beta diversity analysis did not reveal a difference in swab microbiota before and after bowel preparation, but the genus composition of most individuals varied markedly. Conclusion: Swab microbiota resembled tissue microbiota relative to fecal microbiota, but they still differed. Bowel preparation did not alter the overall swab microbiota in the short term but changed the microbial composition markedly in most patients Contact: Chiao-Hsiung Chuang chuang.chiaohsiung@gmail.com. This submission was powered by METAGENOTE (https://metagenote.niaid.nih.gov).