The 5'-end of the flavivirus genome harbors a methylated (m7)GpppA(2'OMe) cap structure, which is generated by the virus-encoded RNA triphosphatase, RNA (guanine-N7) methyltransferase, nucleoside 2'-O-methyltransferase, and RNA guanylyltransferase. The presence of the flavivirus guanylyltransferase activity in NS5 has been suggested by several groups but has not been empirically proven. Here we provide evidence that the N-terminus of the flavivirus NS5 protein is a true RNA guanylyltransferase. We demonstrate that GTP can be used as a substrate by the enzyme to form a covalent GMP-enzyme intermediate via a phosphoamide bond. Mutational studies also confirm the importance of a specific lysine residue in the GTP binding site for the enzymatic activity. We show that the GMP moiety can be transferred to the diphosphate end of an RNA transcript harboring an adenosine as the initiating residue. We also demonstrate that the flavivirus RNA triphosphatase (NS3 protein) stimulates the RNA guanylyltransferase activity of the NS5 protein. Finally, we show that both enzymes are sufficient and necessary to catalyze the de novo formation of a methylated RNA cap structure in vitro using a triphosphorylated RNA transcript. Our study provides biochemical evidence that flaviviruses encode a complete RNA capping machinery.