Computer-Supported Collaborative Learning is based on the learning groups with the help of the computers. Proper method of grouping can promotes cooperation in learning procedure. The different forms of group formation produce different peer relationship and group structure that affect the quality of groups, including initiative, schedule, learning target and learning effect. Based on the students characteristics in CSCL, this paper presents the design of Group Formation System for collaborative learning groups in CSCL with the core of group formation the heterogeneous grouping. This paper gives the detailed heuristic algorithms to form groups. Finally，the paper describes the implementation of the system with PHP＋Apache＋MySQL technology to support the automatic group formation. The system has such functions as involuntary group formation, heterogeneous group formation, random group formation and partnership group formation, and so on. The system can apply to collaborative learning environment for automatic group formation independently and support the implementation and research of CSCL.