Fibre content and its effect on chyme viscosity are associated with changes in the digestive system of humans and pigs. It is unclear if fibre content and viscosity affect digestive function independently or interactively. We evaluated apparent ileal digestibility (AID) of nutrients and intestinal function in thirty-six ileal-cannulated barrows fed for 29 d either maize–soyabean meal (MSBM) or high-fibre MSBM + 30 % distillers dried grains with solubles (MSBM + DDGS) modified to three levels of viscosity by adding 5 % non-viscous cellulose (CEL), 6·5 % medium-viscous carboxymethylcellulose (MCMC) or 6·5 % high-viscous CMC (HCMC). Digesta were collected on days 27 and 28 and intestinal samples on day 29. Feeding CMC, regardless of fibre content, increased viscosity of whole digesta (P = 0·003) and digesta supernatant (P < 0·0001) compared with CEL. Feeding MSBM + DDGS or CMC decreased AID of DM (P = 0·003; P < 0·0001) and crude protein (P = 0·02; P < 0·0001) compared with MSBM or CEL. Feeding CMC regardless of fibre content increased jejunal crypt depth (P = 0·02) and ileal goblet cell area (P = 0·004) compared with CEL. Adding DDGS or CMC did not affect villus height and gene expression of jejunal monosaccharide and amino acid transporters. Feeding HCMC, regardless of fibre content, elevated amylase activity by 46 and 50 % in jejunal (P = 0·03) and ileal digesta (P = 0·01) compared with CEL. In summary, diets with increased viscosity decreased nutrient digestibility and induced intestinal changes that were independent of the amount of fibre fed.