Skip to content
UniKit

Clipboard HTML cleaner

Paste HTML copied from a web page or Word and strip comments, conditional comments, Office-only tags and class/style noise. Output pretty-printed, minified or plain text, with tag and removal counts — entirely local.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Paste the source you copied from a page or Word. Text only: the clipboard is not read and nothing is uploaded.

Cleaned HTML

Tag names are lower-cased; block tags get their own line while inline tags stay with the text.

Paste HTML source to clean it

Tags: 0 · Output chars: 0 · Text chars: 0 · Removed pieces: 0

Plain text

Paste HTML source to clean it

What this tool does

  • Clean rich-text source copied from a web page or Word before pasting it into an email, CMS or code
  • Extract plain text from rich text, or minify the markup to shrink a template

Example

Input

<div class="x" style="padding:0"><p>Hello <b>World</b></p></div>

Output

<div>
  <p>
    Hello <b>World</b>
  </p>
</div>

class/style are dropped, block tags get their own lines and inline tags stay inline.

Frequently asked questions

What exactly gets cleaned?

Four things by default: `<!-- ... -->` comments; conditional comments, `<style>`, `<script>`, `<o:p>` and `<m:...>` Office extras; all attributes except `href`, `src`, `alt` and `title`; and tag names are lower-cased. Each switch can be turned off, and the “Removed pieces” statistic counts the dropped comments and Office blocks.

How do the three output styles differ?

“Pretty-printed” breaks lines at block tags (keeping inline tags such as a, span and b with their text); “Minified” keeps only the spacing the markup needs; “Plain text” drops every tag, turning block tags and `<br>` into line breaks and always decoding entities.

Why do comments disappear from plain text?

Plain-text output means “what you see on the page”, so comments stay out of it even when “Remove comments” is off — they only survive in the pretty and minified output. Text extraction breaks lines at tag boundaries, collapses runs of whitespace and drops empty lines; it does not reflow sentences.

How are entities and indentation handled?

About 35 named entities (`&amp;`, `&nbsp;`, `&mdash;`, …) plus numeric `&#65;` and `&#x1F600;` forms are decoded; unknown entities are left as-is. Pretty and minified output keep entities verbatim unless “Decode HTML entities” is ticked, and indentation can be 0–8 spaces. The tool does not parse the DOM, read the clipboard or use the network — it only processes the string you paste.

Keywords:clipboard html cleanerclipboard-htmloffline

Related tools