Clean DOM Exporter A developer published a lightweight DevTools console snippet that clones the current document, strips bulky elements such as scripts, styles, SVGs, iframes and noscript tags, and copies the resulting minimal HTML to the clipboard. The tool is aimed at Chrome extension development, LLM prompt engineering, and DOM debugging without markup clutter. A lightweight DevTools snippet to extract clean, minimal HTML structure from any live website. Useful for building Chrome extensions, prompt engineering with Large Language Models LLMs , or debugging DOM structures without clutter like inline SVGs or scripts. 1. Open DevTools in your browser F12 or Ctrl + Shift + I / Cmd + Option + I . 2. Go to the Console tab. 3. Paste the following code and press Enter : js = { // Clone current document structure const clone = document.documentElement.cloneNode true ; // Remove unnecessary bulky tags clone.querySelectorAll 'script, style, svg, iframe, noscript' .forEach el = el.remove ; // Copy cleaned HTML directly to clipboard copy clone.outerHTML ; console.log 'Cleaned HTML copied to clipboard ' ; } ; 1. The cleaned HTML is now in your clipboard