The human gastrointestinal (GI) tract contains a complex microbial community that develops in time and space. The most widely used approaches to study microbial diversity and activity are all based on the analysis of nucleic acids, DNA, rRNA and mRNA. Here, we present a DNA isolation protocol that is suitable for a wide variety of GI tract samples, including biopsies with minute amounts of material. The protocol is set up in such a way that sampling can be performed outside the laboratory, which offers possibilities for implementation in large intervention studies. The DNA isolation is based on mechanical disruption, followed by isolation of nucleic acids using phenol:chloroform:isoamylalcohol extraction. In addition, it includes an alternative DNA isolation protocol that is based on a commercial kit. These protocols have all been successfully used in our laboratory, resulting in isolation of DNA of sufficient quality for microbial diversity studies. Depending on the number of samples and sample type, the whole procedure will take approximately 2.5-4 hours.