This project is a simple tool to generate QR codes from text or URLs and save them to the downloads folder.
It also attempts to copy the generated image to the system clipboard automatically.
- Generates a PNG file containing the QR code.
- Saves the QR image to the downloads folder (
Downloadsor similar). - Copies the image to the clipboard when possible.
- Automatically installs missing Python dependencies.
- Python 3.7 or newer
- Python packages:
qrcode[pil]pillowpywin32(Windows only, required for clipboard support viawin32clipboard)
pip install qrcode[pil] pillow pyperclipNote: the script may also try to install missing libraries automatically if they are not already present.
Run the script with Python:
py main.pyYou can also pass the text or URL as command-line arguments:
py main.py https://example.comIf no argument is provided, the script will ask you to enter text manually.
- Checks for missing dependencies and installs them.
- Generates the QR code using
qrcodeandPillow. - Saves the image to the downloads folder.
- Attempts to copy the image to the system clipboard.
- On Windows, clipboard copying can work with
win32clipboardor PowerShell. - On Linux,
xclip,xsel, orwl-copymust be installed to copy the image to the clipboard. - If the QR code cannot be copied to the clipboard, the PNG file will still be saved.
To save it locally, you can download the latest version from GitHub.
QR code generator © 2026 by Arnau TM. is licensed under Creative Commons Attribution 4.0 International