The frame is sandboxed with scripts, forms and top-level navigation turned off. Pasting a page here does not run its JavaScript and does not send the markup anywhere.
How to use
- Paste a fragment or a whole document. The box accepts up to 20,000 characters.
- Press View. Read the tag report, then look at the frame.
- Press Reset to clear both the report and the frame.
Formula / how it works
What gets counted. Every start tag and every end tag whose name begins with a letter is counted. <p>Hello</p> is two p tags, not one element. A title element contributes two to the title count, and its text is also pulled out for the Title line, with inner tags stripped and the text cut at 120 characters. A document with no title element reports “Title: none”. The character count is the length of the string you pasted, including spaces and angle brackets.
Scripts are listed and not run. A start tag named script increments the script count. The frame’s sandbox attribute is empty, which means the browser must not execute script, must not treat the frame as same-origin with this site, and must not let the markup navigate the tab. A form in the pasted markup cannot submit into this page. That is the point of an HTML viewer used on untrusted snippets: you can see the structure without giving the snippet your session. The HTML encoder is the tool for turning angle brackets into entities so they display as text. The HTML minifier removes whitespace. Neither of those draws the page.
Fragments and full documents. A lone paragraph is valid input. A document that starts with a doctype and an html element is also valid input. The frame receives the string as you pasted it. Relative image addresses will not load as your local files, because the frame has no path to your disk and is not same-origin with this site. Remote images may or may not load, depending on the browser’s rules for a sandboxed frame. Do not paste a page here to test whether your images are online. Test that on the site itself.
What the report will not reconstruct. It does not build a DOM outline with nesting, and it does not validate against a schema. A tag inside a comment can still match the pattern, so a commented-out paragraph can inflate the count. Unclosed tags are counted if the opening bracket and the name are present. The report is a census, not a linter.
The limit. Twenty thousand characters is enough for a template and small enough to keep the frame responsive. If you need to pretty-print or compress, do that with the minifier or the encoder, then come back to look. Nothing you paste is stored by this page.
Worked examples
A single paragraph
Inputs: HTML: <p>Hello</p>
Paste <p>Hello</p> and press View. The report sees two p tags, an open and a close, and no title element.
Result: Characters: 12
Tags seen: 2
Script tags: 0 (not run)
Title: none
Tag counts: p 2
The frame below is sandboxed. Scripts, forms and top navigation from the pasted markup do not run.
The frame draws the paragraph. The script count stays at 0.
A title plus a paragraph
Inputs: HTML: <title>Note</title><p>Hi</p>
Paste <title>Note</title><p>Hi</p> and press View. The title line reads Note, and both tag names are counted twice because each has an end tag.
Result: Characters: 28
Tags seen: 4
Script tags: 0 (not run)
Title: Note
Tag counts: p 2, title 2
The frame below is sandboxed. Scripts, forms and top navigation from the pasted markup do not run.
Use cases
- Looking at a snippet before you trust it enough to open it as a file.
- Checking that a title element contains the words you think it does.
- Counting how many script start tags a template carries.
- Showing a fragment to yourself without running its scripts.
Tips & limitations
- Treat the tag counts as open plus close, not as a count of elements.
- Do not use this frame to decide whether your images are deployed.
- Encode the markup first if you need to show the brackets as text.
- Clear the frame with Reset when you are done with an untrusted snippet.
FAQ
Will a script in the paste run?
No. The frame’s sandbox does not allow scripts, and the report only counts script start tags.
Why does a paragraph count as two tags?
The opener and the closer are both tags. The report is a tag census, not a count of elements in a tree.
Can I paste a full document?
Yes, up to 20,000 characters. A fragment such as one paragraph is also fine.
Why did my image not appear?
The frame is not your site and it is not your disk. Relative addresses have nowhere to resolve. Test images on the real origin.
Does it validate HTML?
No. It counts tags and draws the string. Broken markup is still drawn as the browser’s fragment parser allows, and the count can include tags inside comments.
Is the markup uploaded?
No. The report and the frame stay in the browser.
Runs entirely in your browser; nothing is uploaded. Check the output before you rely on it in production code, data or security decisions.