This paper deals with a semidefinite program (SDP) having free variables, a minimization of a linear objective function in a positive semidefinite matrix variable and free real variables subject to linear equality constraints in those variables. This type of SDP often appears in practice. To apply the primal-dual interior-point method developed for the standard form SDP having no free variables, we need to convert our SDP into the standard from. One simple way of conversion is to represent each free variable as a difference of two nonnegative variables. But this conversion not only expands the size of SDP to be solved but also yields some degeneracy in the resulting standard form SDP. We can also modify the primal-dual interior-point method so as to adapt it to an SDP having free variables. This paper proposes a new conversion method that eliminates all free variables. The resulting standard form SDP is smaller in its size, and it could be more stably solved in general because the conversion yields no degeneracy. Effectiveness of the new conversion method applied to SDPs having free variables is reported in comparison to some other existing methods; SDPA, SeDuMi and SDPT3 with the new conversion methods are compared to SDPA with the simple conversion mentioned above, SeDuMi without any conversion and SDPT3 without any conversion, respectively.