XML Sitemap Formatter
Pretty print or minify a sitemap XML with clean indentation, a well-formed check, and a URL count, all in your browser.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Paste sitemap or XML
Result
Formatted locally in your browser. Nothing is uploaded.
How to Use XML Sitemap Formatter
- Paste your sitemap. Drop in a minified or messy sitemap, or any XML you want to tidy.
- Choose how to format. Pick a 2 space, 4 space, or tab indent, or tick minify to compress it instead.
- Select Format. The tool re-indents the XML and keeps leaf elements such as loc on a single line.
- Check the result. The badge shows whether the XML is well-formed and the stats show the URL count.
- Copy the output. Use the copy button and paste the clean XML back into your file.
Frequently Asked Questions
What does this tool do?
It pretty prints a sitemap with clean indentation so it is easy to read, or minifies it to save space.
Does it validate my sitemap?
It runs a well-formed check and shows a badge. For full protocol checks, use the sitemap validator.
When should I minify?
Minifying removes whitespace to make the file smaller for delivery. Pretty printing is better while you edit by hand.
Does formatting change my data?
No. Only the spacing between tags changes. The URLs and values stay exactly the same.
Can it handle large sitemaps?
Yes, within your browser memory. Very large files format more slowly but the result is the same.
Is my data sent anywhere?
No. Formatting happens in your browser, so nothing you paste is uploaded.
Related Tools
XML Sitemap Validator →
Check your sitemap XML against the protocol, with a well-formed check, URL and priority…
XML Sitemap Generator →
Paste your URLs and generate a valid XML sitemap with changefreq, priority, and lastmod,…
XML Formatter →
Pretty-print XML with clean, consistent indentation, keeping attributes and self-closing empties.
CSS Minifier Formatter →
Two-way CSS minifier and beautifier. Context-aware - respects calc(), data URLs, pseudo-selectors. Free, offline,…
Convert CSV to XML →
Convert CSV to XML with custom tag names, element/attribute modes, CDATA wrap, headerless mode.…
Generate Random XML Data - Test Files →
Generate random XML data with customizable elements, nesting, and attributes. Free, instant, and secure…
JSON Formatter and Validator →
Format, validate, and minify JSON with a 2-space, 4-space, or tab indent, right in…
JSON to XML Converter →
Convert a JSON object into clean XML, with keys as tags and nested objects…
SQL Formatter →
Format SQL for readability, uppercasing keywords and putting the main clauses on their own…
XML Minifier →
Minify XML by removing the whitespace and comments between tags, keeping the declaration.
XML to CSV Converter →
Convert repeated XML records into CSV, with the first record setting the columns.
XML to JSON Converter →
Convert XML into JSON, with each element as a key and repeated tags as…