Indonesian President Joko Widodo said China'a claims to the majority of the South China Sea have "no legal foundation in international law," he told Japan's Yomiuri newspaper.
"We need peace and stability in the Asia-Pacific region. It is important to have political and security stability to build up our economic growth," Widodo was quoted as saying.
This was the first time Widodo, who took office in October, has taken a position on the South China Sea dispute.
China has had occasionally tense confrontations with Japan and Southeast Asian countries - the Philippines and Vietnam in particular - over maritime disputes in the East China Sea and the South China Sea, respectively.
"We need peace and stability in the Asia-Pacific region. It is important to have political and security stability to build up our economic growth. So we support the Code of Conduct (of the South China Sea) and also dialogue between China and Japan, China and ASEAN,"Widodo was quoted as saying in Reuters.
Japan has already bolstered partnerships with the Philippines and Vietnam, the two countries most at odds with China over territorial rows in the South China Sea.
"We would absolutely like to learn Japan's excellent experiences in protecting its waters," he told the Yomiuri. Indonesia "is ready to play a role of mediator", Widodo said. Indonesia has been a self-appointed broker in the myriad territorial disputes between its neighbours and China over the South China Sea.
Rizal Sukma, foreign policy adviser to the president, further clarified that Indonesia, which has no claims in the South China Sea, remains a willing "honest broker" in the territorial dispute between its neighbors and China.
In 2009, Indonesia sent its official stance on the issue to the UN commission on the delimitation of the continental shelf, stating that the nine-dotted line has no basis in international law, Rizal added.