HBFTrans2: A Maple package to construct Hirota bilinear form for nonlinear equations. An improved algorithm for symbolic computation of Hirota bilinear form of nonlinear equations by a logarithm transformation is presented. The improved algorithm is more efficient by using the property of Hirota-D operator. The software package HBFTrans2 is written in Maple and its running efficiency is tested by a variety of soliton equations.