The present invention relates to variants of Terminal deoxynucleotidyl Transferase (TdT), each of which (i) has an amino acid sequence similarity to SEQ ID NO: 2. 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33 or 35 with corresponding amino acid substitutions, (ii) is capable of synthesizing a nucleic acid fragment without a template and (iii) is capable of incorporating a modified nucleotide into the nucleic acid fragment.