The 2-1 victory ensured that Scotland qualified as the best-placed runners-up from the three groups thanks to a 0-0 draw between Brazil and Czech Republic.
Scot Gemmill's side will take on England at 14:00 BST on Thursday at Stade Parsemain in France.
Ivory Coast take on the Czechs in the other semi-final.
Scotland faced the Indonesians with captain Oliver Burke on the bench after the Leipzig winger picked up a knock in the win over Brazil.
Indonesia took a surprise lead when Putra Saghara fired past Jack Ruddy after 33 minutes.
But striker Hardie, making his first start in the tournament along with Rangers team-mate Ross McCrorie, curled the equaliser just after the half-hour mark.
Hardie added his second from the penalty spot after 65 minutes following a trip on Celtic defender Anthony Ralston, who had taken over the captaincy.
Scotland Under-20s will face England in the semi-finals of the Toulon Tournament after Ryan Hardie's double secured a narrow win over Indonesia.