Tutorial · 4 min read

How to Export JSON URLs as cURL and wget Download Scripts

Need to download every file linked in a JSON file or API response? Instead of clicking each URL manually, use the JSON URL Extractor to generate a ready-to-run bash or batch download script in seconds.

Why Export Download Scripts From JSON?

When you have a JSON file containing dozens of download links — images from a CMS export, assets from an API response, or files listed in a configuration manifest — opening each URL in a browser is not practical. A curl or wget script automates the entire download process with a single command.

The JSON URL Extractor not only pulls every URL from your JSON, but also generates a correct, ready-to-run script. The .sh export produces a bash script using curl -X GET, while the .bat export produces a Windows batch script using wget.

Step 1: Paste and Extract URLs

Open the JSON URL Extractor and paste your JSON data. The tool recursively extracts every http and https URL. Enable Deduplicate to remove repeated links, and keep Valid Only on to filter out fragments or bare domains.

If your JSON does not parse as valid JSON (e.g., it is a plain list of URLs), the tool auto-detects URL List mode and processes each line as a separate URL.

Step 2: Filter the URL List

Before generating the download script, narrow the list to only the URLs you need:

The toolbar shows the current URL count so you know exactly how many commands will be in your script.

Step 3: Export the Script

Click the Download ▾ button and choose your format:

URLs containing double quotes are automatically encoded as %22 to prevent shell syntax errors. Both formats wrap every URL in double quotes for safe handling of special characters.

Step 4: Run the Script

On Linux/macOS, make the script executable and run it:

chmod +x extracted-urls.sh
./extracted-urls.sh

On Windows, double-click the .bat file or run it from Command Prompt:

extracted-urls.bat

Both scripts download every file to your current working directory. To organize downloads, run the script from a dedicated folder.

Generate a Download Script From Your JSON in Seconds

No coding, no signup. Filter, export, and run — all free.

Open JSON URL Extractor →

Best Practices

Frequently Asked Questions

Can I use the generated curl script on Windows?

The .sh script is designed for Linux/macOS bash. For Windows, use the .bat export which produces wget commands. If you need curl on Windows, install Git Bash or WSL and run the .sh file there.

How does the tool handle URLs with special characters?

URLs containing double quotes are encoded as %22 in the exported scripts to avoid shell syntax errors. Other special characters are preserved as-is since they are valid within double-quoted strings in bash and batch.

Can I filter which URLs to include in the download script?

Yes. Apply the Image, Video, or Other tab filters, or use the Domain and Substring inputs, before exporting. Only the currently visible URLs are included in your download script.

Does the tool upload my JSON data anywhere?

No. Every step — extraction, filtering, and script generation — runs entirely in your browser. Your JSON and URLs never leave your computer.

Can I preview images before generating a download script?

Yes. Click the Preview button to expand the media grid. Image thumbnails appear inline so you can verify which URLs point to actual images before generating your curl or wget script.