HTML Tidy — A built-in HTML beautifier/HTML Formatter Nobody knows about.
You may already have Tidy on your computer! Many operating systems ship with the tidy command pre-installed.
Chances are good, though, that what you have is so outdated that it doesn’t even recognize HTML5. Install the latest using these commands.
How to install via macOS and Linux below.
Run the HomeBrew macOS command in the terminal.
brew install tidy-html5