User:Enterprisey/parsoid-round-trip

Uses Parsoid to convert some wikitext to HTML, and then to convert that HTML back to wikitext. Shows the result, and its difference from the original wikitext. Go to Special:BlankPage/Parsoid round trip once you've installed it.

Usage
Go to Special:BlankPage/Parsoid round trip, put some wikitext in the box, and click the button.

Roundtripping caveat
In production (on the real website), edited HTML is converted to wikitext using an algorithm called selective serialization. Parsoid uses it to eliminate the vast majority of dirty diffs. However, the round-tripping from this script does not use the selective serialization mode (and if used, Parsoid would simply return the original wikitext, since there are no HTML edits). As such, you will likely see a lot of dirty diffs from this script, which is not representative of what happens in production usage.