도구 찾기

↑↓ 이동 Enter 열기

이름을 모르면 작업 내용으로 검색하세요.

HTML Formatter and Minifier

로컬 처리

HTML Formatter and Minifier은(는) 브라우저에서 데이터 형식 지정 및 검증을(를) 수행하며 결과와 제한을 명확히 설명합니다. 이 페이지에는 실제 입출력 예시, 구현 제한, 1차 참고 자료가 포함됩니다.

검토 완료 · 업데이트 · 무료 · 계정 불필요

HTML Formatting and Minification Workspace
Input0 chars
Output
Parsing and conversion run locally in this tab.

HTML Formatter and Minifier은(는) 무엇을 하나요?

HTML Formatter and Minifier은(는) 브라우저에서 데이터 형식 지정 및 검증을(를) 수행하며 결과와 제한을 명확히 설명합니다. 검증된 기능: Prettier HTML formatting, Conservative HTML minification, Inline code left unchanged, Local HTML download.

Format, minify, and sanitize are different jobs

Use formatting for maintenance and review. Use minification only for a tested delivery artifact. Use a dedicated sanitizer when markup comes from an untrusted source; neither formatting nor minification makes HTML safe to render.

사용 방법

  1. Choose Format HTML for readable markup or Minify HTML for a compact delivery copy.
  2. Paste an HTML document or fragment no larger than 2 MB into Input and select Convert.
  3. Review the output, especially whitespace-sensitive text and embedded code, then copy it or download html-output.html.

실제 입출력 예시

Format and minify a compact document fragment

입력

<main><h1>KitLumi</h1><!-- remove --><p>Local tools</p></main>

출력

<main>
  <h1>KitLumi</h1>
  <!-- remove -->
  <p>Local tools</p>
</main>

Minified: <main><h1>KitLumi</h1><p>Local tools</p></main>

Format mode preserves the comment and lays out the markup. Minify mode removes the comment and collapses optional whitespace while retaining explicit tags and quoted attributes.

일반적인 오류와 해결 방법

현상가능한 원인해결 방법
The formatted structure is not the structure you expected.HTML parsing is error-tolerant, so a missing closing tag or invalid nesting can be repaired according to HTML parsing rules.Correct incomplete or misnested markup before treating the formatted result as an authoritative source.
The minified page behaves or renders differently.Whitespace can be significant in inline content, preformatted text, templates, or code that reads exact text nodes.Regression-test the output in its real template and browser context; keep the formatted source when whitespace semantics are uncertain.
Dangerous markup is still present after minification.A minifier reduces source size; it does not sanitize scripts, event handlers, URLs, or embedded content.Use a dedicated allowlist-based HTML sanitizer before rendering any untrusted HTML.

Important behavior of HTML Formatter

이 도구의 구체적인 제한: Minification is not sanitization: scripts, event handlers, unsafe URLs, and other active content remain in the output and must still be treated as untrusted.

표준 및 구현 참고 자료

HTML Formatter — FAQ

Does the HTML Formatter upload my input?

No. Processing runs in the current browser tab, and the page does not send tool input to a KitLumi processing endpoint.

What input does the HTML Formatter accept?

It accepts one HTML document or fragment up to 2 MB. The workspace checks the input and reports malformed or unsupported values before it produces a result.

What does the HTML Formatter produce?

It produces Prettier-formatted HTML or conservatively minified HTML. Copy and download controls appear when the output format supports them.

What limitation should I know?

Minification is not sanitization: scripts, event handlers, unsafe URLs, and other active content remain in the output and must still be treated as untrusted.

변경 사항

실질적인 업데이트: HTML Formatter: Added Prettier HTML formatting, Conservative HTML minification, Inline code left unchanged, Local HTML download, responsive controls, explicit runtime disclosure, and task-specific examples and limitations.

이 도구의 관리자

KL
KitLumi EngineeringKitLumi Engineering이 동작, 테스트, 예제 및 개인정보 설명을 관리합니다.