Formats

XML Formatter

Format, validate, and beautify XML documents.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type XML Formatter and press Return.
  2. Paste or type your text into Input.
  3. Adjust the Options on the right if you need to. The defaults are listed below.
  4. Press Format, or ⌘↵.
  5. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
ModePretty print or minify XMLPretty, MinifyPretty
Indent SpacesNumber of spaces for indentation1–82
Preserve CDATA sectionsKeep CDATA sections intactOn or offOn

Example

Real output from Devly, with the default options.

Input
<app><name>Devly</name><version>2.3.0</version><tools count="65"><tool>Base64</tool><tool>JSON Formatter</tool></tools></app>
<?xml version="1.0"?>
<app>
  <name>Devly</name>
  <version>2.3.0</version>
  <tools count="65">
    <tool>Base64</tool>
    <tool>JSON Formatter</tool>
  </tools>
</app>

From Terminal

With the free command-line tool installed:

Terminal
devly xmlformat --path input.txt
# or pipe text in
pbpaste | devly xmlformat

Quick Switch also finds it by: xml, format, validate, beautify, minify.

More Formats tools