Developer tool
HTML Formatter & Minifier
Beautify messy HTML, create compact production-friendly markup, inspect structural warnings, and download a clean HTML file without sending your source to a server.
๐ 100% private browser processing
Your HTML stays on your device. Xepoca does not upload, render, execute, or store the source you enter.
HTML source
Paste markup or load a local file.
Formatter settings
Formatted output
Source preview only โ HTML is not rendered or executed.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
Xepoca Demo
</title>
<style>
body{font-family:system-ui;background:#020617;color:#fff}.card{padding:24px;border:1px solid #334155;border-radius:18px}
</style>
</head>
<body>
<main class="card" data-theme="dark">
<h1>
HTML Formatter
</h1>
<p>
Format or minify HTML locally in your browser.
</p>
<!-- This comment can be preserved or removed when minifying. -->
<a href="https://xepoca.com" target="_blank" rel="noreferrer">
Visit Xepoca
</a>
<script>
const message = "Keep > signs inside scripts"; console.log(message);
</script>
</main>
</body>
</html>Elements
22
Attributes
9
Input size
667 B
Output size
830 B
+24.4%
Source inspection
No structural warningsThe source scan did not find obvious unclosed tags, comments, or declarations.
This is a source formatter with lightweight diagnostics, not a browser conformance validator or sanitizer.
Readable source
Turn compressed or inconsistent markup into an indented source view that is easier to review, diff, and maintain.
Compact output
Collapse formatting whitespace and optionally remove ordinary comments while preserving raw script, style, pre, and textarea content.
No execution
Xepoca treats your input as source text. It never injects the submitted markup into the page as executable HTML.
How to format HTML
Paste or upload
Add HTML directly or choose an .html, .htm, or .txt file from your device.
Choose output rules
Beautify with your preferred indentation and attribute layout, or switch to minified output.
Review and export
Check source warnings, copy the result, or download a new HTML file.
Formatting vs. minifying HTML
Formatting adds consistent indentation and line breaks so humans can scan document structure more easily. Xepoca keeps raw script, style, preformatted, and textarea content separate from ordinary markup.
Minifying removes formatting whitespace and can remove ordinary comments. It intentionally avoids rewriting JavaScript or CSS inside raw blocks, making the operation conservative rather than an aggressive production optimizer.
Because HTML allows optional closing tags and browser error recovery, the warning panel is intentionally lightweight. For standards conformance, use a dedicated HTML validator in addition to formatting.