AutoHotkey is open source, but with conditions that matter for how you can use it
AutoHotkey (often abbreviated as AHK) is free and open source under the GNU General Public License v2 (GPLv2). This means you can read the source code, modify it, and share your changes — but you have to follow GPLv2 rules when you do. If you're using AutoHotkey to write scripts for yourself or your organization, the license doesn't restrict you. If you plan to distribute scripts or modified versions of AutoHotkey itself, the license creates obligations you need to understand.
The key difference between AutoHotkey and some other free tools is that GPLv2 is a copyleft license. That means if you distribute software that uses AutoHotkey, you must release your own code under the same license. This protects the freedom of the software, but it does limit how you can use it in closed-source commercial products.
Key Takeaways
- AutoHotkey's source code is publicly available on GitHub under GPLv2, which is a free and open license.
- You can use AutoHotkey to write scripts for personal or internal business use without any licensing restrictions.
- If you distribute scripts you wrote with AutoHotkey, you must make your source code available under the same GPLv2 license.
- If you modify AutoHotkey itself and distribute it, you must release your changes under GPLv2 and provide source code to anyone who receives it.
- Closed-source commercial software cannot legally bundle AutoHotkey or scripts that depend on it without releasing its own source code.
What GPLv2 actually requires
GPLv2 protects freedom by requiring that derivative works stay free. When you use AutoHotkey under GPLv2, you get four core freedoms: run the software for any purpose, read and modify the source code, distribute copies, and distribute modified versions. In exchange, if you distribute your work to others, you must pass those same freedoms along.
The practical effect: if you write an AutoHotkey script and keep it private, the license doesn't touch you. If you sell that script, give it to a client, or post it online, you must provide the source code and allow others to modify and redistribute it. This applies to any software that links to or depends on AutoHotkey — if you distribute it, GPLv2 applies to the whole thing.
Using AutoHotkey for personal or internal work
You can write AutoHotkey scripts for yourself, your family, or your employer with no licensing restrictions. You don't have to publish the code, pay fees, or ask permission. This covers automation scripts, keyboard shortcuts, window management tools, or any other use where the script stays on your own machine or within your organization.
Many organizations use AutoHotkey internally to automate repetitive tasks across their network. That's completely legal under GPLv2 because you're not distributing the script outside the organization. The license only creates obligations when you distribute — meaning you give the software to someone else, whether for money or free.
Distributing scripts you wrote with AutoHotkey
If you want to sell an AutoHotkey script, post it on GitHub, include it in a software package, or give it to a client, GPLv2 requires you to release the source code under the same license. You can charge money for the script itself, but you must provide the source code and allow users to modify and redistribute it.
This creates a real constraint for commercial software. If your product depends on AutoHotkey and you want to keep your code proprietary, you cannot legally distribute it. Some developers work around this by offering AutoHotkey scripts as a separate, open-source component, or by using a different tool that has a more permissive license. Others accept that their scripts will be open source as a cost of using AutoHotkey.
Modifying AutoHotkey itself
The AutoHotkey source code is on GitHub, and you can fork it, modify it, and compile your own version. If you keep your modified version private, there are no restrictions. If you distribute it — even to one person — you must release your changes under GPLv2 and provide source code to anyone who receives it.
This is rarely a concern for typical users, since AutoHotkey already does what most people need. But if you're building a custom version for a specific use case and want to distribute it, you'll need to accept that your modifications become part of the open-source project. The AutoHotkey community maintains the main repository, and contributions are welcome.
How AutoHotkey compares to other automation tools
AutoHotkey's GPLv2 license is stricter than some alternatives but more permissive than others. Python, for example, uses the Python Software Foundation License, which allows closed-source software to use it. Lua is in the public domain, with no restrictions at all. On the other hand, GPL-licensed software like some versions of GCC (the C compiler) has the same copyleft requirement as AutoHotkey.
If you need to build closed-source commercial software and AutoHotkey's license is a problem, you might consider Python with a GUI library, or a proprietary automation tool. If you're comfortable with open source or building internal tools, AutoHotkey's license is not a barrier. The choice depends on what you're building and whether you're willing to release your code.
Where to find AutoHotkey's source code and license
AutoHotkey's source code is hosted on GitHub at github.com/AutoHotkey/AutoHotkey. The license text is included in the repository and also on the AutoHotkey website. You can read the full GPLv2 license at gnu.org/licenses/old-licenses/gpl-2.0.html if you want the legal details.
The AutoHotkey community maintains documentation about licensing and common questions on the official website. If you're unsure whether your use case requires you to release source code, reading the GPLv2 text or consulting a lawyer familiar with open-source licensing can give you a clear answer for your situation.
Frequently Asked Questions
Can I use AutoHotkey in a commercial product without releasing my code?
No, not if your product depends on AutoHotkey. GPLv2 requires that any software distributed with or linked to AutoHotkey must release its source code under the same license. You can charge for the product, but the source code must be available and modifiable by users.
What if I only use AutoHotkey internally at my company?
Internal use has no restrictions. You can write scripts, modify AutoHotkey, and use it however you want within your organization without releasing anything. The license only applies when you distribute software outside your organization.
Can I compile an AutoHotkey script into an .exe and sell it?
You can sell the .exe, but you must provide the source code and allow buyers to modify and redistribute it under GPLv2. If you want to keep the script proprietary, you cannot use AutoHotkey.
Does AutoHotkey cost money?
No. AutoHotkey is free to download, use, and modify. There are no licensing fees, subscriptions, or costs. The GPLv2 license is about freedom, not payment.
Can I use AutoHotkey in a closed-source application?
Only if the application itself is open source under GPLv2 or a compatible license. If your application is proprietary, you cannot legally include or depend on AutoHotkey.