The present invention relates to polypeptides having xylanase activity and polynucleotides encoding the polypeptides. The invention also relates to nucleic acid constructs, vectors, and host cells comprising the polynucleotides as well as methods of producing and using the polypeptides. The invention also relates to compositions comprising the polypeptides of the invention and the use of the polypeptides of the invention to solubilise xylan and in animal feed.