Step into any government office and the first thing you notice is stacks and stacks of dusty dog-eared files. And an old computer that more often than not isn’t even on. So, when the Ministry of Coal went paperless last year, a senior bureaucrat said it wasn’t so much the volume of work that was intimidating, but the amount of handholding or training of officers making a complete switch to computers. Around 100 people were individually trained in the new software by three assistant secretaries in more than 10 sessions. “It does take a lot of effort opening up old files, scanning, and uploading them, but the biggest challenge is changing the mindset of people in the ministry,” Anil Swarup, who was then coal secretary, told Fortune India in October.

Now imagine if the ministry had a little help from the outside training its officials in the nitty-gritty of going digital. Enter educational technology or ed-tech firms, and their services such as massive open online courses (MOOCs). Until now, online courses were mostly popular with students and professionals on a budget looking for an Ivy League education. Thousands of young students took courses in everything from mathematical thinking to mechanics from leading U.S. universities such as Yale or Stanford without ever leaving Indian shores. But, now, leading online course providers such as U.S.-based Coursera and Simplilearn are looking beyond students and talking to the government on digital literacy programmes to help bridge the skill gap in India and prepare workers for the jobs of the future. Some online education providers won’t just train the growing work force but also government employees in the intricacies of everything from data analytics to cloud computing as the country goes increasingly digital.

Simplilearn was first off the block. The Bengaluru- and California-headquartered company has partnered with the Digital India initiative’s National E-Governance Division to tutor government employees across the board. Under this partnership, employees will be given free access to courses on the Simplilearn platform. “The goal is to upskill and re-skill government employees in India. The intent is to skill employees with online training programmes across new-age technologies such as cloud computing, data science, Big Data and analytics, and project management,” says Krishna Kumar, founder and CEO, Simplilearn. “Online learning is specifically tailored for the jobs of the future and for skill-based roles. With online learning helping in increasing the literacy and employment rate, it’s a great opportunity for online education companies and the government to partner.”

California-based Coursera is also talking to the central and state governments about bridging the skill gap in the new digital age. Its chief business officer, Nikhil Sinha, says they are still “very initial conversations”, but the company certainly has the experience. It launched its Coursera for Government programme in January under which it has already partnered with various governments to provide new skills from programming to English-language communication. For instance, in the U.S., it has a deal with the Institute for Veterans and Military Families at Syracuse University to train 1,200 transitioning service members, military spouses, and veterans. Participants will take courses in Java programming, web development, data analysis, and hotel management.

Closer home, Pakistani tech company Overseas Technologies and Coursera have partnered with various public institutions in Pakistan, including a government programme to train 36,000 young adults across the country. Participants will take online courses in computer science, data analytics, career success, and language learning. Coursera has also tied up with governments in Egypt, Kazakhstan, and Singapore. Rebecca Taber, head of government partnerships at Coursera, says rapid changes in technology and economy are widening the skill gap worldwide. “Coursera has a team devoted to partnering with governments on workforce development,” she says. “People need new skills to succeed in the changing economy, and companies can’t find the talent they need to grow and thrive. Through Coursera for Governments and Nonprofits, we’ll join forces with them to prepare their communities for the jobs of the future.”

It’s easy to understand why online education providers are looking to partner with the government. On its part, the government has introduced schemes such as the Skill India Mission to ensure the large working population has the right skill sets to enter the job market. And in the budget this year, finance minister Arun Jaitley announced a Rs 4,000 crore programme aimed at providing market-relevant training to 35 million youth across the country. Moreover, of the Indian government’s 52 ministries, the coal ministry is the only one to go paperless so far. Since the government is the largest employer in the country, re-skilling and up-skilling its employees will be a huge task. Narayanan Ramaswamy, partner and head, education, KPMG India, says that since the government is a huge employer, a single entity cannot fulfil its requirements. “Different platforms could work in different areas to address the issue of skill gap,” he says.

The government has also launched its own education portal called SWAYAM. Developed by the Ministry of Human Resource Development and the All India Council for Technical Education with Microsoft’s help, the portal will host 2,000 courses and 80,000 hours of learning at the school, undergraduate, and postgraduate levels. The courses are offered by institutes such as the Indian Institute of Management, Indian Institute of Technology, and Indian Institute of Science. They are free, and certificates are offered at a small cost.

R. Subrahmanyam, additional secretary (technical education) with the HRD ministry, says the government chose the online route to provide the opportunity for quality education to all, especially those from backward areas. “Though we have not formally launched SWAYAM, we are currently undertaking pilot runs with about 40,000 students and about 350 courses. We even have expression of interest from British Council and the University of New South Wales in Sydney in placing their courses on SWAYAM,” says Subrahmanyam.

Online education providers aren’t just looking at the government to widen their footprint in India. As companies embrace automation, hundreds of professionals need to be re-skilled and up-skilled. Technology is permeating every sector, be it health care, education, or journalism (remember the video where a bot wrote a story faster than a human?). Many ed-tech firms have tied up with corporates to train their employees. Coursera launched its programme for corporates last year and Axis Bank signed up as its first customer. Infosys has tied up with U.S. online education company Udacity to offer courses for students who want to join the company. “Online education portals have become the go-to destination for technology-related education, and many corporates are realising this,” says Udacity’s India managing director Ishan Gupta. “Other than offering training courses to corporates we also serve as hiring partners for companies like Paytm, Ola, and Zomato. This is because we are sitting on a talent pool of successful nanodegree holders.”

However, a question on many minds is: Why not use traditional educational channels to train people? The answer is simple: Online courses are cheaper and more accessible. “Anybody can log in without any inhibitions and learn at their convenience. Unlike unaffordable and time-consuming higher education programmes, skill-based online programmes are easily accessible and create opportunities for students and professionals,” says Simplilearn’s Kumar. Moreover, there are more courses and institutions to choose from on these education portals. For instance, Coursera has partnerships with 149 universities offering more than 2,000 courses. U.S.-based online education provider edX offers 1,300 courses, Simplilearn has more than 400, and Udacity has 175 free courses. The courses offered range from basic digital tools to advanced topics such as Big Data analytics and artificial intelligence.

But perhaps the biggest draw of these courses is affordability. Shorter courses are usually free, though certification comes at a cost. However, students don’t have to fork out a fortune: The price of ranges from as little as Rs 999 to more than Rs 50,000 for longer durations. For instance, on edX, one of the free courses by IIT-Bombay called Foundations of Data Structures costs $49 (Rs 3,095.3) with a verified certificate. A MicroMasters course from the U.S. Rochester Institute of Technology costs $150 with certification. Udacity’s so-called nanodegree in web development costs Rs 11,500 a month, Rs 27,000 for three months, and Rs 51,000 for six months. Simplilearn does not have free courses—fees usually start from Rs 999 and vary depending on the duration and the university.

But, will Indians take to these online courses, especially since the hype over them as an alternative to traditional higher education has died down in the West? Well, so far they have. India is Coursera’s second-largest market. Of its 25 million learners worldwide, 2 million are in India. Udacity has 5 million users and India is its biggest market outside of the U.S. A 2015 Harvard Business Review survey found MOOCs are more popular and successful in developing countries while course completion rates are abysmal in the West. “The growth in the Indian platform is greater than what we see globally,” says Coursera’s Sinha.

Follow us on Facebook, Twitter, YouTube & Instagram to never miss an update from Fortune India. To buy a copy, visit Amazon.