US President Donald Trump has said that a peace deal between Israel and Palestine can be a one-state or two-state solution as long as both sides agree on it.

"Looking at two-state or one-state, I like the one that both parties like. I’m very happy with the one both parties like. I can live with either one," Trump said, replying to questions during a news conference with Israeli Prime Minister Benjamin Netanyahu in Washington on Wednesday.

"The United States will encourage a peace and really a great peace deal ... We will be working on it very, very diligently. But it is the parties themselves who must directly negotiate such an agreement," Trump said.

A two-state solution - the idea of Israel and Palestine living side-by-side and at peace - has been the bedrock of US diplomacy for the past two decades.

Netanyahu said that he wanted to focus on "substance" and not "labels," when asked about support for a two-state solution.

"Rather than deal with labels, I want to deal with substance," Netanyahu said during the news conference.

"There are two prerequisites for peace. First the Palestinians must recognize the Jewish state ... Second, in any peace agreement, Israel must retain the overriding security control over the entire area west of the Jordan River," he said.

Trump said that Washington was working to move the US embassy in Israel from Tel Aviv to Jerusalem.

"I would like to see that happen. We are looking at it very very strongly. We are looking at it with great care. Let’s see what happens."