How to choose a suitable license for your extension

From Joomla! Documentation

If you want to distribute your extension, you will need to choose a license carefully. Read Extensions and GPL for more information.

If you want to publish your extension on the Joomla Extensions Directory, you will need to make sure your license is compatible. Make sure you've read the JED Entries License Checklist before choosing a license.