Windows 11/10  ·  JSON config  ·  Copy-paste examples

gallery-dl Config File on Windows — Setup Guide

The gallery-dl config file lets you set permanent defaults — output folder, filename templates, rate limiting, cookies and per-site options. No need to repeat flags on every command.

Where does gallery-dl look for the config file on Windows?

gallery-dl checks these locations in order — first match wins.

Priority 1
%APPDATA%\gallery-dl\config.json

e.g. C:\Users\YourName\AppData\Roaming\gallery-dl\config.json — recommended for permanent setup

Priority 2
gallery-dl.conf (same folder as gallery-dl.exe)

Portable setup — config travels with the executable

CLI flag
gallery-dl --config "C:\path\to\myconfig.json" "URL"

Override config path per-command

Tip: Create the folder %APPDATA%\gallery-dl\ if it doesn't exist. Press Win+R, type %APPDATA%, press Enter, then create a new folder named gallery-dl.

Recommended gallery-dl config for Windows — copy & paste

Save this as config.json in %APPDATA%\gallery-dl\. Edit the paths and options to match your setup.

gallery-dl.conf — recommended Windows starter
{ "extractor": { "base-directory": "C:/Images/", "filename": "{category}_{author}_{num:>04}_{filename}.{extension}", "sleep-request": 1.5, "retries": 5, "timeout": 30, "verify": true }, "downloader": { "part": true, "rate": "2M" }, "output": { "mode": "terminal", "progress": true, "shorten": true } }
Note: JSON requires double quotes and no trailing commas. Use forward slashes / in paths — they work fine on Windows and avoid JSON escape issues with backslashes.

Most useful gallery-dl config options for Windows

Set download folder — applies to all sites
"base-directory": "C:/Images/"
Custom filename template — category + author + number + original name
"filename": "{category}_{author}_{num:>04}_{filename}.{extension}"
Per-site output folder — Instagram into its own subfolder
"directory": ["{category}", "{uploader}"]
Slow down requests to avoid rate limiting (seconds between requests)
"sleep-request": 2.0
Limit download speed (useful on shared connections)
"rate": "2M"
Set cookies file for a specific site (Instagram example)
"instagram": { "cookies": "C:/Tools/gallery-dl/instagram-cookies.txt" }

gallery-dl filename template variables — Windows

Use these variables in "filename" and "directory" settings.

{filename}
Original filename
{extension}
File extension (jpg, png…)
{category}
Site name (instagram, twitter…)
{author}
Uploader/author name
{uploader}
Username/handle
{num}
Sequential number
{date}
Post date
{title}
Post title (if available)
{id}
Post/image ID

Zero-pad numbers: {num:>04}0001, 0042. Date format: {date:%Y-%m-%d}2026-06-09.

gallery-dl config — frequently asked questions

Where is the gallery-dl config file on Windows?
The default location is %APPDATA%\gallery-dl\config.json. Open Run (Win+R), type %APPDATA%\gallery-dl and press Enter to navigate there directly. You can also place gallery-dl.conf in the same folder as gallery-dl.exe for a portable setup.
gallery-dl says "config file not found" — how do I fix it?
gallery-dl doesn't require a config file — it works without one. If you want one, create the folder %APPDATA%\gallery-dl\ and save your JSON file there as config.json. Verify it's valid JSON — even a single missing comma or quote will break it.
How do I validate my gallery-dl JSON config?
Paste your config into jsonlint.com to check for syntax errors. Common mistakes: trailing commas after the last item in an object, using single quotes instead of double quotes, and Windows backslashes in paths (use forward slashes or escape them as \\).
Can I have different settings for different sites?
Yes. Wrap site-specific settings under the site name key. For example: "instagram": {"sleep-request": 3} inside the "extractor" object. Site keys match the {category} variable — instagram, twitter, pixiv, deviantart, reddit, etc.
How do I set a different download folder per site?
Use the "directory" option per site extractor. Example: "instagram": {"directory": ["C:/Insta/", "{uploader}"]}. This creates a subfolder per username automatically.