Free HTML Beautifier & Formatter

QTool.io's HTML Beautifier is a free, browser-based tool that formats and indents HTML code instantly. Customize indentation, wrap attributes, preserve inline elements, or minify your markup. Includes syntax highlighting and runs entirely in your browser for privacy and speed.

Paste HTML to begin
Input
Output

Need something more powerful?

Let us build it for you. Custom APIs, dashboards, automations — whatever you need.

Start a Project →
Open source

QTool.io on GitHub

269 free tools. No signup. Open source. Built by Christian Bucher.

GitHub Browse 269 Free Tools →

Related Tools

HTML Beautifier & Minifier · CSS Box Shadow Generator · Emoji Picker & Search

Related Tools

Free Git Diff Viewer · Free JSON to YAML Converter · Free Accessibility Checker

Related Tools

Free JSON to YAML Converter · YAML to JSON Converter · Free API Mock Server

'; updateLineCount(); autoProcess(); } function formatBytes(bytes) { if (bytes === 0) return '0 B'; const k = 1024, sizes = ['B', 'KB', 'MB']; const i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i]; } function showToast(msg) { const t = document.getElementById('toast'); t.textContent = msg; t.classList.add('show'); setTimeout(() => t.classList.remove('show'), 2000); } /* Tab key support in textarea */ input.addEventListener('keydown', e => { if (e.key === 'Tab') { e.preventDefault(); const start = input.selectionStart, end = input.selectionEnd; input.value = input.value.substring(0, start) + ' ' + input.value.substring(end); input.selectionStart = input.selectionEnd = start + 2; } }); /* IntersectionObserver fade-in */ const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('visible'); observer.unobserve(entry.target); }}); }, { threshold: 0.1 }); document.querySelectorAll('.fade-in').forEach(el => observer.observe(el));