Basic

This is a very basic example of a document.

Click on "Pretty Print" button to beatify the text.

Click on "Minify" button to minify the text. *

Check "Preserve Comments" box if you want to keep comments. Or uncheck it if you want do delete comments from minified XML or CSS. As JSON doesn't have comments, the parameter doesn't affect jsonmin function

Custom Indent Pattern:
By default indent pattern is 4 white spaces. However, user can customize as pattern size as pattern characters. There are 2 ways to customize indent pattern:

  • set number of white spaces as numeric value:
    2, 4, etc.
  • set desired pattern as a string, for example:
    '. . . .'
    '____'
    '- - - -'
    '       '  -  string of white spaces is also valid.
* minify() function works only with whitespace pattern.