Félix Dorfin, 35, was convicted of trafficking about 3kg (6.6lb) of various drugs into the Indonesian holiday island of Lombok.
He was arrested in September last year at the island’s airport.
Indonesia has some of the world’s strictest drug laws – including death for some traffickers.
He plans to appeal against the sentence, his lawyer said.
Dorfin was arrested carrying a suitcase filled with about 3kg of drugs, including ecstasy and amphetamines, after flying into the airport from Singapore.
The judge cited his involvement in an international drug syndicate and the amount of drugs in his possession as aggravating factors.
Prosecutors had requested 20 years in jail and a fine of $700,000 (£540,000) or, failing that, an extra year’s imprisonment. But it is quite common for judges to go beyond what prosecutors require in Indonesia.
However, no-one has been executed in the country since 2016, and a number of foreigners remain on death row.
Earlier in the year, Dorfin escaped from the prison he was being held in, by sawing off the bars on his cell’s window and rappelling down with a rope made of a sarong and curtains, reports say.
A female police officer was arrested for allegedly helping him escape from jail in exchange for money.
He was later recaptured by police who found him hiding in a forest in the north of the island.