Pretty print or minify text in XML, JSON, CSS and SQL formats


Settings Remark
Enter a valid XML, JSON, CSS or SQL text in the input box.
  • XML

    For example:

    <?xml version="1.0"?>
    <CATALOG>
       <!-- Music catalog -->
       <CD>
          <TITLE>Empire Burlesque</TITLE>
          <ARTIST>Bob Dylan</ARTIST>
          <COUNTRY>USA</COUNTRY>
          <COMPANY>Columbia</COMPANY>
          <PRICE>10.90</PRICE>
          <YEAR>1985</YEAR>
       </CD>
       <CD>
          <TITLE>Hide your heart</TITLE>
          <ARTIST>Bonnie Tyler</ARTIST>
          <COUNTRY>UK</COUNTRY>
          <COMPANY>CBS Records</COMPANY>
          <PRICE>9.90</PRICE>
          <YEAR>1988</YEAR>
       </CD>
    </CATALOG>


  • JSON

    For example:

    {
       "first": "John",
       "last": "Doe",
       "age": 39,
       "sex": "M",
       "salary": 70000,
       "registered": true,
       "interests": [
          "Reading",
          "Mountain Biking",
          "Hacking"
       ],
       "favorites": {
          "color": "Blue",
          "sport": "Soccer",
          "food": "Spaghetti"
       },
       "skills": [
          {
             "category": "JavaScript",
             "tests": [
                {
                   "name": "One",
                   "score": 90
                },
                {
                   "name": "Two",
                   "score": 96
                }
             ]
          },
          {
             "category": "Java",
             "tests": [
                {
                   "name": "One",
                   "score": 79
                },
                {
                   "name": "Two",
                   "score": 84
                }
             ]
          },
          {
             "category": "Node.js",
             "tests": [
                {
                   "name": "One",
                   "score": 97
                },
                {
                   "name": "Two",
                   "score": 93
                }
             ]
          }
       ]
    }


  • CSS

    For example:

    hr{
       /* Ruler */
       margin:0;
       padding:0
    }
    h1,h2,h3,h4,h5,h6{
       font-size:100%
    }
    ol,ul{
       list-style:none
    }
    table{
       border-collapse:collapse;
       border-spacing:0
    }
    caption{
       text-align:left;
       font-weight:normal
    }
    th{
       text-align:left
    }
    cite,address{
       font-style:normal
    }
    sub,sup{
       line-height:2
    }
    img{
       border:0
    }
    pre,code{
       font-size:1.2em
    }
    fieldset{
       border:0
    }
    #blq-acc-links li{
       display:inline
    }
    #blq-acc-links h2{
       position:absolute;
       z-index:1;
       top:-999em
    }
    #blq-acc-links a{
       position:absolute;
       z-index:1;
       top:-999em;
       display:block;
       width:150px;
       padding:7px 10px;
       border:1px solid #CCC;
       outline:0;
       background:#FFF;
       color:#333;
       line-height:1.2;
       font-weight:bold;
       text-decoration:none
    }
    .blq-ltr #blq-acc-links a{
       left:-100px
    }
    .blq-rtl #blq-acc-links a{
       right:-100px
    }


  • SQL

    For example:

    SELECT CompanyCode,
                 AgentId
    FROM UniqueAgentIdToUniqueAgentId un
    WHERE un.UniqueAgentId =
       (SELECT UniqueAgentId
       FROM
          (SELECT q.LastChangeDate,
                 a.UniqueAgentId
          FROM QueueUpdates q, AgentProductTraining a
          WHERE a.LastChangeDate >= q.LastChangeDate) t )