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:
- Use the Image tab to filter image files for a mass-download script.
- Use the Video tab to target only video files.
- Apply the Domain filter to restrict downloads to a specific server.
- Use the Substring filter to include only URLs matching a pattern (e.g.,
/assets/).
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:
- cURL Script (.sh) — Produces a bash script with
#!/bin/bashheader and onecurl -X GET "URL"per line. Run it on any Linux or macOS terminal. - wget Batch (.bat) — Produces a Windows batch script with
@echo offheader and onewget "URL"per line. Run it on Windows Command Prompt.
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
- Test on a small batch first. Export 5-10 URLs, run the script, and verify files download correctly before processing the full list.
- Use the Other tab to find non-media download links. PDFs, ZIP files, and documents typically fall under "Other." Filter there first, then apply a substring like
.zipor.pdfto narrow down. - Watch for rate limits. If your script targets an API, add a
sleep 1between curl commands to avoid hitting request limits. The exported script is a starting point — customize it as needed. - Export to a dedicated download folder. Create an empty directory, move the script there, and run it. This keeps downloaded files organized and prevents accidental overwrites.
- Combine with Preview for verification. Use the Preview grid to quickly spot broken image or video URLs before generating the download script, saving you failed download attempts.
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.