Is there a way to minify HTML? Is there a way to minify HTML in Drupal 8, something like the Minify module which is for Drupal 7?
Use spaceless tag. This will not minify the HTML, instead avoids extra whitespace between HTML tags to avoid browser rendering quirks. When cached, can serve better.

In html.html.twig

{% spaceless %}

&lt;!DOCTYPE html&gt;
&lt;html{{ html_attributes }}&gt;
 #rest of the code
&lt;/html&gt;

{% endspaceless %}


For compression there is a twig extension

Edit: Use Minify Source HTML module which comes for both D7 and D8.