How to Check a Model's License on the Hugging Face Hub
Every model on the Hugging Face Hub comes with a license that says what you may do with it. Some allow almost anything, including selling a product built on them; others forbid commercial use or add conditions. Check it before you build on a model. This guide finds the license of google-bert/bert-base-uncased on its page and from the terminal.
The Example
The model is google-bert/bert-base-uncased, one of the most downloaded models on the Hub. Its page is public, so you don't need an account.
Prerequisites
- uv, for the terminal check in Step 3. This guide uses uv 0.13.10 with Python 3.15.2.
Step 1: Find the License on the Model Page
Open huggingface.co/google-bert/bert-base-uncased. Under the model's name is a row of tags: its task, the libraries it works with, its training data and its language. The license is the tag that starts with License:.

Here it's apache-2.0, the Apache License 2.0, which allows commercial use, with conditions such as keeping the license and copyright notices.
Step 2: Open the License Menu
Click the license tag. A small menu opens:

| Item | What it does |
|---|---|
| Read on choosealicense.com | Opens a plain-language summary of the license: what it permits, what it requires and what it limits |
| View LICENSE file | Opens the license file stored in the model's own files |
| List models using this license | Searches the Hub for models with the same license |
Read the summary before you rely on a license you don't know.
Step 3: Read the License from the Terminal
The tag comes from the model card's metadata, which you can also read with the hf command. Create a small project for it:
uv init --python 3.15 license-check
cd license-check
uv add huggingface_hub
hf models info prints a model's details from the Hub. --expand cardData limits it to the card's metadata, where the license is:
uv run hf models info google-bert/bert-base-uncased --expand cardData
{
"id": "google-bert/bert-base-uncased",
"card_data": {
"datasets": [
"bookcorpus",
"wikipedia"
],
"language": "en",
"license": "apache-2.0",
"tags": [
"exbert"
]
}
}

"license": "apache-2.0" is the same license the page showed. The command works unchanged in PowerShell, and it's handy for checking many models from a script.
What to Look For
- The license name. Common ones on the Hub are
apache-2.0andmit, which allow commercial use, and Creative Commons variants, some of which, such as those withnc, forbid it. - A custom license. Some models use their own terms. Read the license file itself before using them.
- The training data. The card also lists the datasets the model learned from; for some uses, their terms matter too.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Assuming every model on the Hub is free to use in a product | Some licenses forbid commercial use or add conditions | Check the license of every model you use |
| Checking only the base model of a fine-tuned model | The fine-tuned model can have a different license | Check the license of the exact model you load |
FAQ
Is this legal advice?
No. The license tag and summaries help you understand what a model allows; for anything important, read the license itself or ask a lawyer.
Does the license apply to what the model produces?
It depends on the license. Some say nothing about outputs, others do. Read the license file.
Conclusion
The tag under the model's name showed License: apache-2.0, its menu linked to a summary and the license file, and hf models info … --expand cardData returned the same apache-2.0 from the terminal.
Additional Resources
- Model cards — where a model's license and other details are written.
- Licenses — the license identifiers the Hub recognizes.
- choosealicense.com — plain-language summaries of open-source licenses.
