"I have profound respect for those journalists who make efforts to protect democracy and the Constitution," he said while addressing the Council of Pakistan Newspaper Editors (CPNE) in Lahore.
Sharif said he believes in a free and independent media and judiciary which were important for the development of the country. He suggested that for the next two years, TV channels should avoid the race for ratings and support the government's reform policies.
The Prime Minister said "media should be accountable" and play a responsible role. He said journalists can help a lot in improving Pakistan's image internationally.
Besides praising journalists, Sharif asked them to "formulate a code of conduct" so that those violating them should be held responsible. Talking about the issues faced by Pakistan, he said being Prime Minister was akin to "a bed of thorns".
Sharif also expressed his disapproval over the sit-ins by Pakistan Tehreek-i-Insaf chief Imran Khan last year as part of the opposition movement against his government.
"The objectives of the sit-ins are beyond my understanding," he said.
He said Pakistan had to pay economic and political price for the sit-ins as visits by foreign dignitaries were cancelled due to the instability caused by the agitations.