The sequence of an endo-chitosanase gene (CSN) from Aspergillus fumigatus was optimized based on the preferred codons of Pichia pastoris and synthesized in vitro through overlapping PCR (CSN-P). The gene was cloned into a yeast expression vector, pHBM905A, and secretorily expressed in Pichia pastoris GS115. The yield of CSN-P reached ~3 mg/ml with a high-density fermentation in a 14 l fermenter and the enzyme activity was ~25,000 U/ml. The enzyme had half-lives of 2.5 h at 80°C, 1 h at 90°C and 32 min at 100°C. It retained 70% activity after incubation with 10 M urea at room temperature for 30 min. This enzyme was used for a large-scale preparation of oligosaccharides: 3 g enzyme converted 200 kg chitosan into oligosaccharides in 24 h at 60°C.