WASHINGTON—President Donald Trump said he believes he has developed a positive relationship with North Korea’s leader despite their mutual public insults, suggesting he is open to diplomacy after months of escalating tensions over Pyongyang’s nuclear-weapons program.

“I probably have a very good relationship with Kim Jong Un, ” Mr. Trump said in an interview Thursday with The Wall Street Journal. “I have relationships with people. I think you people are surprised.”

Asked if he has spoken with Mr. Kim, Mr. Trump said: “I don’t want to comment on it. I’m not saying I have or haven’t. I just don’t want to comment.”

Mr. Trump’s remarks on North Korea, with which the U.S. has no formal diplomatic relations, came in a wide-ranging, 45-minute interview in the Oval Office about the first year of his presidency.

As with North Korea, Mr. Trump offered some optimistic words about his efforts to remake the North American Free Trade Agreement with Mexico and Canada.