Republican presidential nominee Donald Trump has claimed most of the people he insulted on Twitter deserved it.

Those who have been on the end of his online insults include Democrat rival Hillary Clinton, US president Barack Obama, Democrat senator Elizabeth Warren and Fox News journalist Megyn Kelly.

Its OK, most of them deserved it, Trump said in an interview with ABCs Good Morning America, when he was asked about the various insulting comments he has made over the years following the release of a list of the comments by The New York Times.

I believe in fighting back when people are against me, when they tell lies, you know, I have the power of this instrument and, frankly, sometimes Ill use that.

And I agree sometimes it will revert back or sometimes maybe it doesnt come out — you have to be careful with it, The Hill reported him as saying.

His comments came as his wife Melania, who also appeared on the show, said she would focus on protecting children from being hurt on social media.

The GOP nominee has been both praised and criticised for his use of the social media platform, with some suggesting his comments are not presidential and have over-stepped the mark, while others have suggested he is able to reach out to more people by using Twitter.

His most famous comments including repeatedly referring to Clinton as crooked, describing vice president Joe Biden as not very bright and calling Bill Clinton the worst abuser of women in US political history.

Trump also had an ongoing Twitter feud with Megyn Kelly, in which he referred to her as being a bimbo and refused to attend a debate she was chairing.

With just over two weeks to go until the election, Trump is beginning to see a slight bump in the polls following several weeks of scandals that have dogged his campaign, including allegations of abuse and the release of footage of him making lewd comments about women.

However, he has more recently hammered home policy including a new deal for African Americans, the promise of immigration control and business creation.