Nouplo

XML formatter

Indented to be read, or squeezed to one line to be sent.

Examples temporarily replace the input and settings. You can restore your previous work.

0 characters
Output
Paste or type above to see the result here.

Your files stay on your device

This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.

Example

Example: checking a sitemap.xml that arrives as one 587-character line

A small restaurant’s website builder writes sitemap.xml as a single line of 587 characters: the XML declaration, a comment with the date it was made, and four page addresses. Before sending it to search engines, the owner pastes it in and keeps “Indent it” with two spaces.

  1. Each url element holds other elements, so it is broken into lines and indented under urlset. loc, lastmod and priority hold only text, so each stays whole on one line.
  2. The XML declaration and the comment “generated 2026-10-02” are kept as they were, in their place.
  3. Read down the list: the fourth address, /old-menu, was last changed on 5 March 2024 — a page the owner forgot to take out.
Setting Result
Indent it, two spaces 25 lines, 681 characters
Indent it, four spaces 25 lines, 751 characters
Indent it, tab 25 lines, 646 characters
Minify to one line the original 587-character line, unchanged

Four addresses with their dates, readable at a glance. Nothing is checked against the sitemap rules: the formatter lays the file out, it does not validate it. Minifying the indented version gives back exactly the 587-character line.

How it works

  1. Paste the XML.
  2. Choose indenting or minifying.
  3. Copy the result.

Frequently asked questions

Does it validate the XML?
No, and that is deliberate: the XML people want to read is often the XML that does not quite parse. Tags and text are laid out as they are found, so a fragment or a file with a stray character still comes back readable.
What happens to CDATA and comments?
They are carried through exactly as typed, and a CDATA section is never re-indented inside.
Why does <name>Jane</name> stay on one line?
An element holding nothing but text reads better whole. Elements holding other elements are indented by depth.
How do I minify XML?
Choose “Minify to one line”: every tag and every piece of text is joined up, without the line breaks and indentation between them. Comments and the XML declaration stay in. The sitemap in the example goes from 25 lines back to its single line of 587 characters.
Are spaces in my text or attributes changed?
Spaces inside a text are kept; only those at its start and end are trimmed, so a title of “ A Book ” comes out as “A Book”. Attribute values are left exactly as typed, and the gaps between attributes become one space: book id="1" lang="en" comes out as book id="1" lang="en".
Is the XML sent anywhere?
No. It is formatted in your browser.

Related tools