# Sell software with license keys
Give every sale of a digital product its own license key, made by Crate or taken from keys you upload, then revoke, reactivate or export keys.
A license key is a unique code a buyer enters to activate software, a plugin, a game or anything else that needs a key. Crate gives every copy sold its own key and shows it to the buyer with their purchase. License keys are on every plan.
```video walkthroughs/f20-license-keys
title: Sell license keys
caption: Add a license policy, sell a copy and see the key on the confirmation page.
```
## Before you start
- You need a digital product. See [Sell a digital download](/docs/products-orders/sell-digital-downloads).
- Decide where keys come from: Crate can make them, or you can upload keys you already have.
## Step 1: Add a license policy
1. In the sidebar, open **Catalog**, then **License keys** under **More**.
2. Select **Add license policy**.
3. Choose the product in **Product**.
```screenshot products-orders/license-keys/01-license-keys-empty
alt: The License keys page with no policies yet, showing Sell license keys and Add license policy
caption: Catalog → More → License keys.
```
## Step 2: Choose where keys come from
Under **Where keys come from**, choose one:
- **Make them for me**: Crate creates a new key for every copy sold. You can set the **Key format** (each `X` becomes a random character) and a **Prefix (optional)** of up to 8 capital letters or digits.
- **I'll upload my own**: Crate hands out keys you paste or upload, one per copy, oldest first.
## Step 3: Set limits and save
1. **Devices per key**: how many devices one key can activate. Leave it empty for no limit.
2. **Key lasts (days)**: counted from the sale. Leave it empty for a lifetime key.
3. Select **Create policy**.
```screenshot products-orders/license-keys/02-policy-dialog
alt: The License policy dialog with Product, Where keys come from, Devices per key, Key lasts (days) and Prefix
caption: Leave the limits empty for unlimited devices and keys that never expire.
```
> [!TIP]
> You can also turn keys on from the product. In **Edit product**, under **Delivery**, switch on **License key** and set **Activations per key** and **Key expires after**.
## Step 4: Add your own keys (upload only)
1. Next to the product, select **Manage**.
2. Paste keys into **Paste keys, one per line**, or select **Or upload a .txt or .csv file**.
3. Select **Add keys**.
Crate skips duplicates and tells you how many it skipped. The page shows how many keys are left to sell.
> [!WARNING]
> When the uploaded keys run out, buyers can't check out until you add more. Crate warns you with **Running low. Add more keys soon.** before that happens.
## What the buyer gets
After paying, the buyer sees their key on the order confirmation page and in their receipt, and can find it later on their download page.
```screenshot products-orders/license-keys/03-buyer-key-phone
alt: The order confirmation page on a phone showing the purchased product and its license key
caption: Each copy sold gets its own key.
frame: phone
```
## Manage keys after the sale
Sold keys appear under **Your keys**. Search by buyer, product, order or the last 4 characters of a key, and filter by **Status** or **Product**.
The **⋯** menu on a key has:
- **Copy key**: copies the full key. The list only shows the last 4 characters.
- **History**: who did what to the key, and when.
- **Revoke key**: stops the key from validating, for example after a refund. The buyer's apps stop working until you reactivate it.
- **Reactivate**: makes a revoked key work again.
To free a device seat, open the key and remove the device. The app on that device will need to activate again.
```screenshot products-orders/license-keys/04-keys-list
alt: The License keys page with a policy row and a list of sold keys, with one key's menu open
caption: Revoke, reactivate, copy and see the history of each key.
```
Select **Export CSV** to download your keys. The file follows your current search and filters.
## Check the limits
| Limit | Value |
|---|---|
| Keys in one upload | 5,000 |
| Upload file size | 2 MB |
| Key length | 4 to 200 characters, no spaces |
| **Activations per key** in the product editor | 1 to 1,000 |
| **Key expires after** in the product editor | 1 to 36,500 days |
## If something goes wrong
- **"Sold out. Buyers can't check out until you add keys."** Your uploaded keys have run out. Add more.
- **"Every digital product already sells keys. Add a digital product first."** Each digital product already has a policy. Create another digital product, or edit an existing policy with **Manage**.
- **"Activations per key must be 1 to 1,000."** Enter a number in that range, or leave it empty for no limit.
- **Some uploaded keys were skipped.** They were duplicates, had spaces, or were shorter than 4 characters.
## Related
- [Sell a digital download](/docs/products-orders/sell-digital-downloads): create the product the keys belong to.
- [Products overview](/docs/products-orders/products-overview): every kind of product you can sell.
- [Resend download links](/docs/products-orders/resend-download-links): send a buyer their purchase again.
