Beautify or minify?
Beautify makes code easy to read: one statement per line, consistent indentation. Use it on code you need to understand or change, such as a snippet copied from a page.
Minify makes code small: comments and extra spaces go, and in JavaScript local names get shorter. Use it on files your visitors download, so pages load with less data. Keep the readable version as your source and edit that one.
What each language does here
- HTML: minifying removes comments and collapses spaces. Text in pre and textarea is kept as written, and scripts and styles inside the page are minified too.
- CSS: comments and spaces go. Strings, url() values and the spaces calc() needs stay.
- JavaScript: minified with Terser, which reports the line of any syntax error.
- JSON: checked first, so you also find errors. Key order and long numbers stay exactly as written.
Questions
Is the code formatter free?
Yes. There is no account and nothing to install. It runs in your browser.
Is my code uploaded?
No. Formatting happens in your browser, and your code is not sent to Almulx or anywhere else. Only the formatting libraries are downloaded, from almulx.com, the first time you press a button.
Can minifying break my code?
It should not change what the code does, but test the result before you publish it. JavaScript that relies on function names, or HTML that relies on exact spaces, can be sensitive. Keep the original file.
Which libraries does it use?
js-beautify for beautifying HTML, CSS and JavaScript, and Terser for minifying JavaScript. Both are open source. The JSON, CSS and HTML minifying and the highlighting are small scripts on this page.