Tutorial · 5 min read
How to Create a Sitemap XML From JSON — Generate SEO Sitemaps Instantly
If your CMS, headless backend, or API exports data as JSON, you already have the URL list you need for a sitemap. The JSON URL Extractor turns that JSON into a valid sitemap.xml in seconds — no coding, no command line.
Why Generate a Sitemap From JSON?
Many modern websites store their page structure in JSON — from headless CMS exports and API dumps to configuration files and SSG content manifests. When you need to submit those URLs to Google Search Console, manually writing a sitemap.xml is tedious and error-prone.
With the JSON URL Extractor, you paste the JSON, see every link instantly, filter out unwanted entries (image assets, video embeds), and export directly as sitemap.xml. The output follows the standard sitemap 0.9 protocol — no tweaking needed.
Step 1: Paste Your JSON Containing Page URLs
Open the JSON URL Extractor and paste your JSON data. This could be a CMS export, an API response containing page entries, or any JSON with loc, url, or link fields. The tool recursively scans every string value and extracts all http and https URLs.
Try the Sitemap JSON sample from the dropdown to see how a typical sitemap data export looks when processed — it includes page URLs, image assets, stylesheets, and JavaScript files.
Step 2: Filter Out Non-Page URLs
A CMS export often mixes page URLs with image links, CSS files, and script sources. To build a clean sitemap:
- Click the Other tab to show only non-image, non-video URLs — typically where your page links are.
- Use the Substring filter to narrow further. For example, type
/blog/to keep only blog page URLs, or.htmlto find HTML pages specifically. - Type a domain in the Domain filter to keep URLs from a specific host (e.g.,
example.com) and exclude CDN or third-party URLs.
Step 3: Export as Sitemap XML
Once your filtered URL list is ready:
- Verify the URL count in the top toolbar — Google recommends max 50,000 URLs per sitemap.
- Click the Download ▾ button and select Sitemap (.xml).
- The tool generates a valid
<urlset>document with each URL wrapped in<url><loc>...</loc></url>, with special characters properly XML-encoded. - Upload the
.xmlfile to your server and submit it to Google Search Console.
The export respects your current filters — only visible URLs are included. If you need to combine multiple sitemaps, repeat the process and upload both.
Turn Your JSON Into a Sitemap — No Coding Required
Paste your data, filter, preview, and export. All free and browser-based.
Open JSON URL Extractor →Best Practices
- Always deduplicate before exporting. CMS exports often include the same URL in multiple fields. Keep the Deduplicate option enabled to ensure every page appears only once in your sitemap.
- Filter out canonical duplicates manually. If your JSON includes both www and non-www versions, use the Domain filter to keep only one and re-extract if needed.
- Preview images before including them. If your sitemap targets image search, use the Preview grid to verify that image URLs are reachable before adding them to the XML.
- Keep sitemaps under 50,000 URLs. If your export exceeds this limit, split the JSON into smaller chunks and generate multiple sitemap files with a sitemap index.
- Use the Other tab as your starting filter. Most page URLs fall into the "other" category. Start there, then apply substring filtering to narrow to your actual page links.
Frequently Asked Questions
Is the generated sitemap.xml valid for Google Search Console?
Yes. The sitemap.xml export follows the standard sitemap 0.9 protocol with proper XML encoding. You can upload it directly to Google Search Console without any modification.
Can I exclude image URLs from the sitemap?
Yes. Use the Image/Video/Other tabs to filter the URL list before exporting. Click Other to show only non-media links, then export as XML. Only the currently visible URLs are included in the export.
Does the tool support deduplication for sitemaps?
Yes. The Deduplicate option is enabled by default. It compares URLs case-insensitively and keeps only the first occurrence, preventing duplicate entries in your sitemap.
Can I preview images while building a sitemap?
Yes. Click the Preview button to expand the media grid. Image thumbnails appear inline so you can visually verify that asset URLs are correct before including them in your sitemap.
What is the maximum number of URLs a sitemap.xml can contain?
Google recommends a maximum of 50,000 URLs per sitemap and a file size under 50MB. For larger exports, split your URL list into multiple sitemaps and use a sitemap index file.