Provided are thieno[3,4-d]pyrimidin-7-yl and furo[3,4-d]pyrimidin-7-yl ribosides, riboside phosphates and prodrugs thereof as well as intermediates and methods of preparation. The compounds, compositions, and methods provided are useful for the treatment of Flaviviridae virus infections.