Appearing before the Senate Banking Committee, Powell offered an upbeat assessment of the state of the U.S. economy.

Powell said the U.S. economy has grown at a solid pace so far this year and noted the latest data suggests economic growth in the second quarter was "considerably stronger" than in the first quarter.

The Fed chief also described recent inflation data as "encouraging," with consumer price inflation a little above the central bank's 2 percent target.

"Looking ahead, my colleagues on the FOMC and I expect that, with appropriate monetary policy, the job market will remain strong and inflation will stay near 2 percent over the next several years," Powell said.

With the strong job market, inflation close to the objective, and the risks to the outlook roughly balanced, Powell said the Fed believes gradually raising interest rates is "the best way forward."

"We are aware that, on the one hand, raising interest rates too slowly may lead to high inflation or financial market excesses," Powell said.

He added, "On the other hand, if we raise rates too rapidly, the economy could weaken and inflation could run persistently below our objective."

Powell said the Fed will continue to weigh a wide range of relevant information and stressed that the central bank's policy decisions will depend on the economic outlook.

The Fed has raised rates twice this year to the current range of 1.75 to 2 percent and has signaled two more rate hikes before the end of the year.

"The upbeat tone of Fed Chair Jerome Powell's semi-annual testimony to Congress suggests that uncertainty over trade policy will not prevent the Fed from continuing to raise interest rates," said Andrew Hunter, U.S. Economist at Capital Economics.

He added, "Although trade tensions remain a downside risk, we continue to expect strong activity growth and rising inflation to prompt the Fed to raise interest rates in September and December this year and twice more in early 2019."

Powell did not say much in his prepared remarks about the recent trade disputes between the U.S. and key trading partners other than to say the ultimate outcome of current discussions over trade policy is "difficult to predict."