📚 HTML Attribute Extractor

Extract element names and attributes from pasted HTML snippets. Runs in your browser.

Last updated: November 8, 2026 · By the BoltQuickTools team

0 elements found

List every attribute in a block of HTML

Reviewing a template or a pasted third-party snippet by eye is slow, especially when you only want to know which classes, data attributes or links it uses. This page reduces markup to one line per element, using the browser's DOMParser. Scripts in the snippet do not run while it is being parsed, and the page's code does not send it anywhere.

Using it

Paste into HTML Snippet and the Attributes box updates as you type. Extract reruns it, Copy Attributes copies the list, Load Sample fills in an example and Clear empties both boxes. The line below the buttons gives the element count.

Sample input and output

<a href="/docs" class="primary" data-track>Docs</a>
<button type="button" aria-label="Open menu">Menu</button>

Produces:

a: href="/docs", class="primary", data-track=""
button: type="button", aria-label="Open menu"

Values are quoted the way JSON quotes strings. A valueless attribute shows as an empty string, and a double quote inside a value is written with a backslash, so value="say &quot;hi&quot;" appears as value="say \"hi\"".

What gets left out

The results reflect how a browser parses the snippet, which can surprise you:

Questions you may have

Is it safe to paste HTML I do not trust?

Nothing in the snippet executes. Event attributes are just text in the list: <span onclick="alert(1)"> reports span: onclick="alert(1)". That also makes this a quick way to spot inline handlers in copied code.

Can I extract just one attribute, such as every href?

The page has no filter. Copy the list and search or filter it in your editor.

Which page should I use for other clean-up?

To indent the markup, use the HTML beautifier. To remove the tags and keep only the text, use the HTML tag stripper. To convert the attributes to React names, use HTML to JSX.