James Duncan Halpert is a fictional character in the U.S. version of the television sitcom The Office, portrayed by John Krasinski.