XML Studio — Formatter & Validator

Paste XML to format, minify or validate it. Errors show the exact line, column and cause, and whitespace that carries meaning (mixed content, xml:space) is never touched. XPath search and JSON conversion are on the same screen. Your data never leaves your device.

On-device・No uploadMobile friendlyWorks offline

Your files and input are processed only inside your browser on this device and are never uploaded to our servers.

XML input
0 chars0 lines
Result
Enter XML and the result appears here

How to use

  1. config.xml

    Paste or open XML

  2. Formatted XML2 or 4 spaces, or tabs
    One-line XML
    JSON

    Check and reshape

Paste XML, check it, then format, minify or convert it to JSON
  1. Paste XML into the input pane, or click “Open file” (drag & drop works too). Shift_JIS, EUC-JP and UTF-16 files are detected and decoded.

  2. Choose a mode: Validate, Format, Minify, Tree view, XPath search or Convert to JSON. The result updates as you type.

  3. For formatting, pick the indent, attribute line breaks, empty-element style and comment handling. A list under the result shows how whitespace was handled.

  4. If there is an error, check the reported line, column and excerpt, and use “Go to error” to jump there. Your input is never altered.

  5. In the tree view, copy the XPath of any element or attribute in one click. In XPath search, type an expression to see the number of matches and each hit.

  6. Copy the result or download it. When saving you can choose UTF-8, Shift_JIS, EUC-JP or UTF-16, and the encoding in the XML declaration is updated to match.

What it does

Formatting that keeps the meaning

Only the whitespace between the child elements of element-only elements is rebuilt. Text-only elements, mixed content (text beside elements, or child elements separated only by blanks without a line break such as <b>one</b> <b>two</b>, which are read as word spaces) and anything under xml:space="preserve" keep their text and whitespace exactly (tag spelling is still tidied). Comments, CDATA, processing instructions, DOCTYPE, quote styles and entity references are kept as written, and a list shows what was handled how. Formatting twice gives the same result, and format → minify → format returns the formatted text.

Errors with line, column and a fix

Mismatched or unclosed tags, duplicate attributes, unescaped & and literal < in text and more are explained with the cause and the fix. The matching start tag or first attribute is pointed out too, and “Go to error” selects the spot in the editor.

Namespace-aware validation

Undeclared prefixes are caught, and so are duplicate attributes that differ only in prefix but resolve to the same namespace. The tree and XPath search use a prefix table built from the document’s own declarations, so default-namespace elements can be addressed as d:item.

Encoding declaration mismatches

When you open a file, the real encoding (UTF-8, UTF-16, Shift_JIS, EUC-JP) is detected from the BOM and bytes and compared with the encoding in the XML declaration. When saving, the declaration is matched to the encoding you choose.

Safe by design, no network

External DTDs and external entities are never fetched (declaring an external entity is refused as an XXE guard). Entities that reference other entities, and short entities expanded in bulk, are rejected as expansion bombs. Input size, nesting depth and node count are limited.

XPath search and JSON conversion

Search runs XPath 1.0 in a stoppable background thread and lists the match count and the path of each hit, with namespace handling explained on screen. The JSON conversion rules are shown next to the result, and elements whose text order cannot be kept are counted.

Use cases

  • Make an XML API response or config file readable and review changes
  • Find exactly which tag is unclosed or which namespace prefix is undeclared
  • Explore RSS, SVG, AndroidManifest.xml, pom.xml or SOAP documents with the tree and XPath
  • Spot files whose encoding declaration disagrees with their bytes (e.g. Shift_JIS content declared as UTF-8)
  • Inspect XML from outside without worrying about external entities (XXE) or entity-expansion bombs
  • Turn XML into JSON to hand to other tools or scripts

Supported formats

Input

XML.xml.svg.rss / .atom.xhtml.kml / .gpx.plist.csproj / .config.wsdl / .xsd / .xslUTF-8 / UTF-16 / Shift_JIS / EUC-JP

Output

Formatted XML (2 / 4 spaces, tab)Minified XML (one line)JSONSave encodings: UTF-8 / UTF-8 with BOM / Shift_JIS / EUC-JP / UTF-16 LE

Capability matrix

FeatureSupportNotes
Well-formedness validation with line/column errorsSupported—
Undeclared namespace prefixes and duplicate attributesSupported—
Encoding declaration vs. actual bytesSupportedFor opened files only; pasted text is Unicode
Format (indent, attribute wrapping, empty elements, comments)SupportedMixed content and xml:space="preserve" are never changed
Minify to one lineSupportedOnly whitespace between elements is removed
Tree view and XPath copy (namespace-aware)Supported—
XPath 1.0 searchSupportedRuns in a separate thread (stops after 8 s; Stop button). The namespace axis, variables, id() and XPath 2.0+ are not supported
XML → JSON conversionSupportedRules shown on screen. For JSON → XML use the data converter
XXE and entity-expansion-bomb rejectionSupportedNo network access
DTD entity expansionPartialShort text-only entities are accepted and left unexpanded; nested, markup-containing and external entities are refused
Schema validation (DTD / XSD / RELAX NG)Not supportedWell-formedness only
XSLT transformationNot supported—
Canonical XML (C14N) and XML signaturesNot supported—
XML 1.1 specifics and UTF-32Not supportedUTF-32 files cannot be read
Offline useSupportedWorks without a connection once loaded

Limits & notes

  • Up to 20 million characters (20 MB for files). Above one million characters auto-run pauses and you press “Run”.
  • Nesting is limited to 1,000 levels and the total of elements, text, comments etc. to 1.5 million.
  • XPath search stops after 8 seconds or when you press “Stop”. Only the first 500 matches are listed.
  • DOCTYPE entities: up to 10,000 characters each, 1,000 of them, and 1 million characters produced in total.
  • Line ends are normalised to LF (XML treats CR LF as a single line end anyway).
  • Whitespace between the child elements of element-only elements is treated as insignificant. If a DTD makes it significant, check the output first.
  • Attributes are wrapped when a start tag is longer than 100 columns (a tab counts as 4).
  • Validating and formatting work on a phone, but for long XML and XPath results a PC’s wider screen is easier to read.

Privacy & safety

Your XML and files are processed only inside your browser. Nothing is sent to or stored on any server, and no external DTD, schema or entity is ever fetched. You can safely format XML that contains tokens or personal data. Closing the page discards everything.

FAQ

How do I fix an XML “end tag does not match” error?
Paste the document here to see the position of the mismatched end tag, the element that should have been closed there, and the position of its start tag. The usual causes are a missing end tag, wrongly nested elements or a case difference — XML is case-sensitive.
My text contains “&” or “<” and I get an error. How do I write them?
Write a literal & as &amp; and < as &lt; (> can be &gt; but need not be). AT&T becomes AT&amp;T. HTML names such as &nbsp; and &copy; do not exist in XML; use numeric references like &#160; and &#169;.
Can formatting change the whitespace of my text?
Only whitespace between the child elements of element-only elements is rebuilt. Text-only elements, mixed content (text beside elements such as <p>some <b>bold</b> text</p>) and xml:space="preserve" content are left as is, and the result lists which elements were not touched.
XPath cannot find my default-namespace elements.
In XPath 1.0 a name without a prefix only matches elements in no namespace. For elements declared with xmlns="…", use the prefix from this tool’s table (for example //d:item) or write //*[local-name()="item"]. Paths copied from the tree use the same prefixes, so you can paste them straight into the search.
Is it safe against XXE and billion-laughs attacks?
Declarations of external entities (SYSTEM / PUBLIC) are refused and no file or URL is ever read. Entities that reference other entities, contain markup, or expand to a huge size are refused as well. A DOCTYPE that points at an external DTD is not fetched.
What does an encoding mismatch mean?
For example the XML declaration says encoding="UTF-8" while the file is actually saved as Shift_JIS. Parsers may fail or show garbled text. When you open a file, the real encoding is detected and any mismatch is reported; when saving you can match the declaration to the encoding you choose.

PLIST Studio (open and convert plist)

Drop a .plist file to see its contents as a tree, whether it is XML or binary (bplist00). You can also save it as XML, binary or JSON. For the internal structure of an .exe or .dll, use EXE/DLL Info Viewer; for XML formatting or XPath search, use XML Studio.

No upload

OPML Converter & Editor (OPML Studio)

Paste OPML (the RSS subscription list format) or choose a file to see feed and folder counts, duplicate feed URLs and broken URLs. After removing duplicates or flattening folders, convert to CSV, JSON or Markdown, or save as OPML. Feed contents are never fetched.

No upload

JSON Studio — Formatter & Validator

Paste JSON to format, minify or validate it instantly. Errors are shown with the exact line, column and cause, and comments or trailing commas can be auto-repaired. Your data never leaves your device.

No upload

YAML / TOML Studio — Validate, Format & Convert

Paste YAML, TOML or JSON to validate, format or convert it. Errors show the exact line and column, and type traps such as “no becomes false” and anything lost in conversion are flagged up front. Your data never leaves your device.

No upload

API Client

Enter a method and URL and press Send: your browser sends the request straight to the API, and you see the status, timing, headers and body. This site’s server relays nothing and never receives what you enter or your credentials.

Diff Tool — Text & Code Compare

Paste or drop two versions and see added and removed lines, plus the exact words that changed inside each line. Copy or save the result as a unified patch. Nothing leaves your browser.

No upload

Last updated: