DirtyMarkup - a free tool to clean HTML, CSS, and JavaScript


DirtyMarkup is a free tool I created in 2009 and Surreal CMS has sponsored for years. You can use it to tidy up and properly format HTML, CSS, and JavaScript code.

Version 3 launched on Monday along with a free public API. That means you can use DirtyMarkup to clean your code programmatically from your own app or plugin.

What’s new:

  • Complete rewrite using Node.js (previously built in PHP)
  • Using CodeMirror instead of Ace
  • Features a beautiful, custom CodeMirror theme inspired by Atom’s popular One Dark
  • Upgraded to the latest tidy-html5 library
  • Using the js-beautify Node module for JS/CSS (previously used a PHP library for CSS and the client-side version jf js-beautify for JS)
  • Using local storage instead of cookies to save preferences indefinitely
  • A handful of new options for JS and CSS formatting

I’m leaving this here because Surreal has a lot of web designers/developers who will find it useful. Now that there’s an API, the possibilities are endless. :slight_smile:


Cory. That’s awesome!


That link didn’t work for me. :frowning:


Whoops, updated. The domain is dirtymarkup.com.


Just made extensive use of this after pasting in Surreal edited code a client asked me to add extra sections to.

Brilliant, thanks! :smile: