Surface matching technique is a key technique in automatic generation of 3D finite element mesh. In this paper, a surface matching technique including surface-gap filling, boundary match and C-node match, is introduced. Eight types of free facet configurations and their corresponding matching rules are established. Then a combined method of priority nodes and relative position relationships for boundary match is presented, and an effective method for C-node match is given, too. The methods can achieve precise match between mesh boundaries and model boundaries, and establish reasonable geometry and topology connections of matched nodes. Several examples are provided to demonstrate the accuracy and efficiency of the algorithms presented in this paper.