Web Dev
HTML Minifier
Minify or beautify HTML code.
How to use it
- Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type HTML Minifier and press Return.
- Choose Minify or Beautify at the top.
- Paste or type your text into Input.
- Adjust the Options on the right if you need to. The defaults are listed below.
- Press Minify, or ⌘↵.
- To go the other way, press Swap or ⌘S. The output moves into the input.
- Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.
Options
| Option | Values | Default |
|---|---|---|
| Indent SpacesIndentation for beautify mode | 1–8 | 2 |
| Remove commentsStrip HTML comments | On or off | On |
| Collapse whitespaceRemove extra whitespace | On or off | On |
Example
Real output from Devly, with the default options.
Input
<!DOCTYPE html>
<html>
<head>
<title>Devly</title>
</head>
<body>
<!-- main -->
<h1> Hello, Devly </h1>
</body>
</html><!DOCTYPE html><html><head><title>Devly</title></head><body><h1>Hello, Devly</h1></body></html>
From Terminal
With the free command-line tool installed:
Terminal
devly htmlminify --path input.txt # or pipe text in pbpaste | devly htmlminify
Quick Switch also finds it by: html, minify, beautify, compress, markup.