If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Creative commons and open source

In the U.S., as soon as you make a creative work and fix it in a tangible form, you are now the copyright owner and nobody else can distribute or adapt that work without your permission (except in the case of fair use).
But what if you want your work to be widely distributed and built upon?
Copyright owners can apply licenses to their creative works that lessen the copyright restrictions and increase what others are allowed to do with their works. Since licenses are legal documents written in legal-ese, it can be hard for a lay-person to read a license and fully understand its permissions.
Fortunately, the vast majority of copyright owners of now use a small set of popular and well understood licenses. For creative works such as writing and multimedia, copyright owners can apply one of the Creative Commons licenses. For software, programmers can apply an open source license. Any type of creative work can be made available in the public domain.

Creative Commons

Creative Commons is a non-profit organization that offers 6 licenses for sharing creative work.
All of the licenses require attribution, to make sure the original author is credited for their work.
The licenses differ in whether they also require these conditions:
  • Share Alike: The reused work must be licensed using the same CC license as the original work.
  • Non-Commercial: The reused work can only be used for non-commercial purposes.
  • No Derivates: The original work can be distributed and displayed, but it cannot be modified.

CC in action

Khan Academy offers most of its content under the CC-BY-NC-SA license, where "BY" represents the Attribution condition, "NC" represents NonCommercial and "SA" represents ShareAlike.
Creative Commons icon that indicates the license. Says "CC BY NC SA".
Thanks to that CC license, the non-profit organization LearningEquality is able to share our content in Kolibri, an app that is designed for offline use and brings educational content to learners that don't have high-speed Internet access or modern computers.
Screenshot from Kolibri app, showing a Khan Academy video on statistics. Underneath the video, it says "License: CC BY-NC-SA" and "Copyright holder: Khan Academy".
Kolibri displays the CC license and copyright details below each video.

Using CC-licensed content

According to the State of the Commons in 2017, there were more than 1.4 billion CC-licensed works available online, a mix of images, videos, sound recordings, presentations, articles, and more.
To sort through all that CC-licensed material, try using Creative Commons search or Google Image Search, with results filtered based on license.
Screenshot of Google search results for "cute cat". Underneath the search bar, "Images" is selected on the left and "Tools" is selected on the right. The "Usage rights" dropdown displays 5 options, and "Labeled for noncommercial reuse" is selected.
Google image search results with a "Usage rights" filter.
Generally, if a creative work is available under a CC license, the license will be written near the work somewhere. It might be in an image caption or a video description, or it may even be in the footer of a website, if all of the content on the site is under the same CC license.
Remember that when a content creator makes their work available under a CC license, they still have rights. As users and remixers of CC-licensed content, we have a legal obligation to respect the conditions of the license: to always provide attribution, and to only use the work if our remix satisfies all the conditions.

Making CC-licensed content

To host CC-licensed creative work on your own website, you can use the Creative Commons tool to choose a license and display it visibly near the work. If you use a content hosting site like YouTube or Flickr, they often provide a way for creators to specify a CC license for uploaded work.
Screenshot of YouTube user interface for editing video details. "Advanced" tab is selected. The "license and rights ownership" dropdown shows two options "Standard YouTube License" and "Creative Commons - Attribution". The CC license is selected.
YouTube UI for editing video details, including license type.

Open source

Computer software is often a lot more alike than it is different. Just consider the apps you use every day; they have user interfaces with buttons, forms, and menus, they authenticate user logins in the server code, and they store data in databases.
If software engineers had to write all of that code from scratch every time they built a new app, there would be a lot fewer websites and apps in the world. Instead, many software engineers build on the work of others, thanks to the growing availability of open source code.

Open source licenses

When a programmer wants to make their code reusable, they publish it online under an open source license. That license enables other programmers to bring the code into their own projects, as long as their reuse meets the conditions of the license.
An example of a broad and permissive open source license is the MIT license. It allows for distribution, modification, commercial use, and private use of the code, as long as the copyright and license information are included in the reused code.
Khan Academy has several open source projects and makes them all available under the MIT license. Every open source project has a LICENSE file in the main folder, and that license file specifies the license for every line of code in the project.
Here's the MIT license file for KaTeX, a JavaScript library that renders math equations:
Screenshot of LICENSE file in KaTeX repository.
There are a number of other open source licenses that software companies and programmers can attach to their codebases, and the most popular licenses are tracked by the Open Source Initiative.
Some open source licenses are "copyleft", a similar restriction as the "share alike" condition for Creative Commons licenses. When you use open source software with a copyleft license, your derivative software typically must be distributed with a copyleft license as well.

Using open-source code

There are many benefits to using open source software in a codebase:
  • Software engineers no longer need to write the code that's available from the open-source project and can spend their time writing code that's specific to their product.
  • There are often multiple open source projects with similar goals, such as the hundreds of drag-and-drop JavaScript libraries that are available online. A software engineer can quickly try out libraries and choose the best one for their needs, without having to pay money or negotiate permission.
  • Popular open source projects have multiple contributors, so their maintenance and improvement does not depend on a sole engineer or a particular company. About 15,600 developers from more than 1,400 companies contributed to the open-source Linux operating system from 2005-2017.
There are also drawbacks, with security being one of the biggest concerns. Since anyone can look at open source code, a hacker could find a vulnerability in the code and then use their knowledge of that vulnerability to carry out cyber attacks. Even worse, they could submit a code change to an open source codebase that introduces a new vulnerability.
In July 2018, an attacker introduced code into a popular JavaScript tool that stole authentication credentials for thousands of users. A few months after, another attacker introduced code into a JS library that harvested account details from users of a cryptocurrency wallet app.

Making code open-source

Before any business or engineer can even consider using open source software, someone out there needs to actually make their code open source.
What are the benefits of making your own code open source? On a personal level, it can feel very good for a software engineer to give back to the software ecosystem. For a business, there's a potential of attracting a community of open source contributors that can improve the code more than the business can with their own resources.
But of course, there are always drawbacks to consider. When you make code open source, you're inviting many more developers to use and rely on that code. Those developers will have questions, suggestions, and bug reports, and it takes significant time to respond to the community.
If you're a business that's considering making your code open source, then you also need to consider the competition. Could someone come along, take your code, and put you out of business? Many companies do successfully make money off an open source product, but they typically also offer other services like support and consultation.
🤔 If you were starting a technology company, would you make your code open source? Why or why not?

Public domain

A creative work that is in the public domain is no longer protected by copyright law and free of copyright restrictions. Anybody can use and reuse that creative work in any way, and they do not have to provide attribution.
Creative works with expired copyrights automatically enter the public domain, decades after the creator's death. The works of Shakespeare, the compositions of Mozart, and the paintings of Rembrandt are all now in the public domain.
Icon with the text "Public Domain" and a copyright sign with a slash through it.
While a creator is still alive, they can choose to waive their exclusive rights voluntarily by declaring that their work is in the public domain. Creative Commons suggests using the CC0 license to declare such a waiver in a way that works across countries with different copyright laws.
Icon with the text "Public Domain" and a circled "0".

🙋🏽🙋🏻‍♀️🙋🏿‍♂️Do you have any questions about this topic? We'd love to answer—just ask in the questions area below!

Want to join the conversation?

  • leaf red style avatar for user layaz7717
    Other than having their code improved, how can companies make money off of making their code open source?
    (18 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user Martin
      Transparency for one, because open access to the source code means people can examine it. That builds trust in the product because people don't have to worry about a black box. Also it means you basically get depending on the size of the project, thousands of people running security checks for free.

      Progress for another, making source code open means people can build on it. That allows people to build on those ideas to create something new. Something which can also be used by the company to improve its product.

      Also, open-source has become really popular over the years, so the attribute "open source" alone might increase the attractiveness of your product for potential customers.
      (38 votes)
  • male robot hal style avatar for user MitRox
    Can open source also be more secure?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user zulqatfain
    Can you change it from being opensource to another form of copyright later on if you change your mind?
    (7 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user HomeSchoolHacker
    I heard that for every person scouring the code of a project for malicious intent, there are 100 others trying to increase the security of that project. If this is true, wouldn't it mean that a properly maintained open source project would be more secure than a proprietary project?

    Earlier, we discussed that programmers like a challenge and can often bypass DRM. Is it possible that somehow a malicious hacker could somehow get access to the source code of a proprietary project?

    If the above is true, would that mean that proprietary projects have less "good" eyes on the code due to it being locked down, but an equal amount of "malicious" eyes on the same code compared to an open source project?

    If somehow this makes sense and ends up being true, then it would make open source projects, somewhat ironically, more secure than closed source projects.
    (7 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user LN
    Isn't it important to distinguish "Free" from "Open Source," especially when it comes to software?

    Wondering why the original "Copyleft" license concept and the role of the Free Software Foundation or GNU are not mentioned? Very valuable to read materials about "license compatibility" and different versions of the GPL if you are discussing these questions. Learners here will greatly benefit by including this as food for thought.
    (4 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seed style avatar for user kpendley
    ohbokay bye.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • primosaur tree style avatar for user arnau.coca
    why I'm so good at getting pints
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user 4806908478
    What are the benefits of open source software in a codebase?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user jarodriguez
    What is public domain
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Kendra Austin
    I had a question about the Share-Alike condition for CC licenses. What would be the advantage to that? To making sure the reused work also used the same CC license as the original work?
    (1 vote)
    Default Khan Academy avatar avatar for user