Understanding someone else’s code
Formatting a downloaded CSS or HTML is the first step to being able to read and modify it.
Pretty-print CSS, HTML or SQL.
🔒 This file is processed in your browser. It is never uploaded anywhere.
…
Formatting code means reorganising its spaces, line breaks and indentation so the structure is visible at a glance. It changes nothing about what the code does: the program behaves exactly the same before and after.
It is needed more often than you would think. Minified code downloaded from a website is unreadable by design. SQL returned by a tool arrives as one endless line. And CSS that has passed through several hands usually carries a mixture of indentation styles that makes it hard to follow.
Well-formatted code is reviewed faster and hides fewer bugs, because indentation makes it obvious what sits inside what and where a closing bracket is missing.
Formatting a downloaded CSS or HTML is the first step to being able to read and modify it.
A long query on one line becomes comprehensible when each clause gets its own row.
When a file mixes indentation from several sources, formatting makes it consistent.
Right now this tool covers CSS, HTML and SQL; for JavaScript you can use a local editor together with the "Code minifier" the other way around.
No, it only adjusts spacing, line breaks and indentation; the code's behavior stays exactly the same.