Make your HTML source code pretty and/or compact.
The Beautify module buffers the HTML output of Drupal and processes it through a formatter - aka beautifier. Beautifiers are configurable and extensible plugin. You can create your own beautifier in your custom module too if you want.
Available beautifiers:
- Tidy (requires the Tidy PHP extension installed on your environment)
- HTML Beautify library (View the Github repo
How to install
- Download the module
composer require drupal/beautify - Enable the module
drush en beautify - Go to admin page Admin > Config > Development > Beautifiers
- Select the default beautifier, edit and save the configuration
Similar modules
- Tidy HTML: implementation the Tidy HTML library with fewer options.
- Minify HTML
Slack channel
Join the discussion on Slack in the #beautify channel. Details on how to connect to Drupal Slack here.
In memoriam of Richard Burford, original developer of this module whom company - Freestyle Systems - sponsored the development of the D5 and D6 versions.
Project information
- Project categories: Developer tools, Integrations, Performance
- Ecosystem: Beautify HTML, Minify Source HTML, Tidy Html
6 sites report using this module
- Created by psynaptic on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.




