A German government spokesperson has confirmed that the personal data and documents of hundreds of politicians have been released on the internet.

The government added that no sensitive information relating to the chancellery had been affected.

German media had earlier reported that hackers had posted personal data from hundreds of German politicians from major parties, including credit card details and mobile phone numbers.

Politicians from the far-left Linke party were among those affected, a spokesman told Reuters.

The data, published on a Twitter account, also included addresses, personal letters and copies of identity cards, the public broadcaster said, citing affiliate rbb.

All major German parties except for the far-right AfD are said to be affected. The identity of the hackers and their motive were not known, the report said.

"I can confirm that there has been an incident", the Linke party spokesman said, adding that Dietmar Bartsch, leader of the party's group in Germany's lower house of parliament, was among those affected.