If you want to be able to legally drive a vehicle in Sri Lanka, you have to either obtain a temporary driving license or have your international driving permit endorsed.
To get a temporary license, you’ll have to go to the Department of Motor Traffic and it’s recommended to get there early. The department is located in Werahera (address: Department of Motor Traffic Rd, Boralesgamuwa, Sri Lanka), which is a 30-minute drive away from Colombo, it’s open on weekdays from 9 am until 4 pm and on Saturday from 9 am until 12 pm. It shouldn’t take you more than an hour, but it can get quite busy and you will be sent to several counters. Thankfully everyone speaks English and will help you make sense of it all.
To get your Sri Lankan temporary driving permit you will need to bring the following: passport, copy of the passport, copy of the Sri Lankan visa issued, a valid driving license from your country, copy of the driving license. The procedure costs 100 LKR (0.50 USD).
In the end, it’s all pretty straight forward. The people at the Department of Motor Traffic are very helpful and will tell you where to go and what they need from you. With the congested traffic in Colombo though, it will most likely take you half a day.
The second option is endorsing your international driving permit. With the IDP you could go to the Automobile Association of Ceylon, located in Colombo, to get your it endorsed. The cost for this is 4400 LKR (24 USD). But, with an IDP most car rental agencies can also take care of this for you. This way you could avoid having to drive in Colombo with its crazy traffic.
Another advantage of going down this route is that you will receive a driving permit that is valid for the duration of your IDP (normally 1 year) whereas the driving permit you get at the Department of Motor Traffic is only valid for the duration of your tourist visa (normally one month).
Note that if you’re driving without a valid license and get stopped by a police officer, you will likely get a fine from 1000 up to 10000 LKR (5 to 50 USD), so be careful!