Disclosed herein are nucleoside phosphoramidates of formula 4 and their use as agents for treating viral diseases. These compounds are inhibitors of RNA-dependent 5 RNA viral replication and are useful as inhibitors of HCV NS5B polymerase, as inhibitors of HCV replication and for treatment of hepatitis C infection in mammals.