> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/datasets/create-and-upload/download-a-dataset.md).

# Download a Dataset

## Web App

{% hint style="info" %}
Refer to the [Download a Roboflow Universe Dataset](/datasets/universe/universe/download-a-universe-dataset.md) documentation if you want to download a dataset from Roboflow Universe.
{% endhint %}

To download or export a dataset from Roboflow, first navigate to the Dataset page in your project.

<figure><img src="/files/p51476TpOyxDyQ0UBKLi" alt="" width="165"><figcaption></figcaption></figure>

To the right of the image search bar, click Export.

<figure><img src="/files/kfaUc2nwz1Cvm8JUe0V8" alt="" width="344"><figcaption></figcaption></figure>

A modal will appear giving you options for formats to download your data as. Roboflow supports [over 50 different annotation formats](https://roboflow.com/formats).

You can also choose to either download your dataset directly as a zip file or be provided with a code snippet to download the data locally.

<figure><img src="/files/SpwFlVR2l3aID0oQ0fl2" alt=""><figcaption></figcaption></figure>

If you choose the code option, you will be able to choose from a Python code snippet, a curl command, or a direct download link to your dataset.

<figure><img src="/files/DeN1SZfutgWWCQhXYjhH" alt=""><figcaption></figcaption></figure>

### FAQs

<details>

<summary>Why don't my zipped image counts match the UI?</summary>

There are two possibilities for this:

* An image randomly failed to download in the respective cloudly service.
* The image is corrupt or too large, leading to some errors.

Our application only generates the export zip once and then re-downloads the same export if the same format (e.g. COCO) is selected. If you ever notice that the image count is off in the download, you can always create a new version and re-download.

\\

</details>

<details>

<summary>Are the downloaded images the original quality?</summary>

No. To prevent training slowdowns, we compress images at a level that maintains a balance between training speed and resolution needed for sufficient model performance.

If you're looking to download a single original quality image, you can do so by clicking on a image on your dataset and selecting "Download Image".

If you're looking to download multiple original quality images, we recommend using our [CLI](https://docs.roboflow.com/datasets/create-and-upload/download-a-dataset#cli) or our [Image Search API](https://docs.roboflow.com/datasets/manage/manage-datasets/dataset-search#search-images-across-a-workspace).

</details>

## Python SDK

Once a project has a generated version, you can download its images and annotations in any of the supported export formats. Use `Version.download()` for the synchronous "fetch and unzip" flow, or `Version.export()` to ask Roboflow to (re)generate the export asynchronously without downloading.

### Download a version

```python
import roboflow

rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("my-detector")
version = project.version(3)

dataset = version.download(
    model_format="yolov8",      # or "voc", "coco", "darknet", etc.
    location="./my-detector-v3", # optional, defaults to ./<project>-<version>
    overwrite=False,             # optional, set True to re-download an existing dir
)

print(dataset.location)  # path on disk
```

#### Parameters

* `model_format` (str) - export format. Common values: `yolov8`, `yolov11`, `voc`, `coco`, `darknet`, `tfrecord`, `createml`, `multiclass`. The full list is project-type-dependent - pass an invalid value to get the full list back as an error.
* `location` (str, optional) - destination directory. Defaults to `./<project-slug>-<version>`.
* `overwrite` (bool, default `False`) - re-download even if the target directory already exists.

The returned `Dataset` object has a `.location` attribute pointing to the unzipped directory.

### Trigger a fresh export without downloading

```python
ok = version.export(model_format="coco")
```

This kicks off a server-side regeneration of the export. The call returns once the generation is complete (or raises `RuntimeError` if it fails). After that, a subsequent `download()` will fetch the freshly generated artifact.

### Public Universe datasets

You don't need to be a member of the workspace to download a public Universe project - your API key just needs Universe access:

```python
project = rf.workspace("roboflow-100").project("poker-cards-cxcvz")
project.version(1).download("yolov8", location="./poker-cards")
```

### REST and CLI equivalents

* REST: the dataset link comes back as part of [View a Version](/datasets/versions/dataset-versions.md#view-a-version); also see [Export Data](/datasets/versions/dataset-versions/exporting-data.md#http-api).
* CLI: see [Download a Dataset (CLI)](#cli).

## CLI

If your project has a saved version, you can download the images and annotations for that version using the command line.

### Command

```bash
roboflow version download <workspace/project/version> -f <format> -l <location>
```

Or use the shorthand alias:

```bash
roboflow download <workspace/project/version> -f <format> -l <location>
```

Where:

* `<format>` is one of the supported dataset formats (like `voc`, `yolov8`, `coco`, `darknet`, etc). Run `roboflow version download --help` for the full list.
* `<location>` is the local path to download to (optional - defaults to current directory)
* The dataset URL uses [resource shorthand](https://docs.roboflow.com/reference/cli/cli/using-the-cli#resource-shorthand): `workspace/project/version`, `project/version`, or just specify `-p project` and a version number.

### Examples

Download a dataset version in VOC format:

```bash
roboflow download -f voc -l ./my-dataset my-workspace/hand-gestures/1
```

Download using project shorthand (uses your default workspace):

```bash
roboflow download -f yolov8 hand-gestures/1
```

Download publicly available datasets from [Roboflow Universe](https://universe.roboflow.com):

```bash
roboflow download -f coco joseph-nelson/chess-pieces-new/25
```

### JSON Output

For scripting and automation, use `--json` to get structured output:

```bash
roboflow download hand-gestures/1 -f yolov8 --json
```

```json
{
  "workspace": "my-workspace",
  "project": "hand-gestures",
  "version": 1,
  "format": "yolov8",
  "location": "./hand-gestures-1"
}
```
