Xylanase is one of industrial enzymes with diverse applications including the paper-bleaching industry and feed additives. Here, a strain having xylanolytic activity and identified as Bacillus sonorensis T6 was isolated from soil. A secretory enzyme was identified by mass-spectrometry as a xylanase of glycosyl hydrolase family 11, with a molecular weight of 23.3 kDa. The xylanase gene of Bacillus sonorensis T6 was cloned and expressed in Escherichia coli (yielding an enzyme designated as rXynT6-E) and in Pichia pastoris (yielding rXynT6-P). The recombinant xylanases were found to have optimal activity at 47–55°C and pH 6.0–7.0. The recombinant xylanase expressed in P. pastoris has 40% higher thermal stability than that expressed in E. coli. The recombinant xylanases retained 100% of activity after 10 h incubation in the pH range 3–11 and 68% of activity after 1 h at pH 2.0. The xylanase activities of rXynT6-E and rXynT6-P under optimal conditions were 1030.2 and 873.8 U/mg, respectively. The good stability in a wide range of pH and moderate temperatures may make the xylanase from Bacillus sonorensis T6 useful for various biotechnological applications, e.g., as an enzyme additive in the feed industry.