Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

SVG Viewer

An SVG viewer here counts start tags and, when the markup has no script tag, draws it in a sandboxed frame. The sample is a forty-by-forty svg with one circle. The census says two start tags, circle and svg, and zero scripts.

New

A script tag is counted and the frame is left empty. The drawing is not worth running someone else’s script.

How to use

  1. Paste SVG. Include the svg element.
  2. Press View. Read the script count before you look at the frame.
  3. Reset clears the report and the frame. The sample circle comes back in the box.

Formula / how it works

The census. Start tags are counted. The sample has an svg start tag and a circle start tag, so the total is 2. Closing tags are not start tags and are not added. Script start tags are also listed on their own line. Zero means the frame may be filled. One or more means the frame stays empty and the report says why. The frame’s sandbox does not allow scripts even when the frame is filled. The extra refusal is so a script is obvious in the text, not only blocked quietly.

What is not measured. Width and height attributes are not turned into a layout report. Colours are not read. A path’s d attribute is not interpreted. If you need to see the shape, use the frame. If the frame is empty because of a script, delete the script element and press View again. The HTML viewer is the sibling for HTML. It also sandboxes. This page is for SVG and for the script rule above.

A script example. An svg element whose only child is a script element reports two start tags, one of them script, and does not draw. The number 1 inside the script is text, not a drawing command. It is not executed.

The tag census counts start tags, so a circle and its absence of a closer still count as one circle if you wrote a single start tag. A closing tag is not a start tag. Script is counted separately because it changes whether the frame is filled. An SVG with a script is still described. It is just not drawn. Width and height attributes are not read as a layout. If you need the rendered size, look at the frame, and remember the frame is sandboxed.

Icons from design tools are usually one svg element and a handful of paths. The census lets you see that mix before you drop the file into a page. A script in an icon is unusual and worth the empty frame. Remove it at the source rather than asking this page to strip it for you. The page will not rewrite your markup. It reports and, when it is safe, draws. A sandboxed frame also means external images inside the SVG may not load. A self-contained icon with no links is the kind of file this view is meant for.

Worked examples

A circle and no script

Inputs: SVG: <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><circle cx="20" cy="20" r="8"/></svg>

Leave the sample, <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><circle cx="20" cy="20" r="8"/></svg>, and press View. Script tags are 0.

Result: Start tags: 2 Script tags: 0 (not run) Tag counts: circle 1, svg 1 If there is no script tag, the frame below is sandboxed and does not run scripts.

A script tag blocks the frame

Inputs: SVG: <svg><script>1</script></svg>

Paste <svg><script>1</script></svg> and press View. The script count is 1 and the frame stays empty.

Result: Start tags: 2 Script tags: 1 (not run) Tag counts: script 1, svg 1 A script tag is present, so the frame is left empty.

Use cases

  • Checking a icon file has no script element.
  • Counting circle and svg start tags in a tiny file.
  • Drawing a script-free fragment without leaving the page.
  • Seeing a refusal instead of a silent block.

Tips & limitations

  • Read the script line before you trust the frame.
  • Closing tags are not part of the start-tag total.
  • Size attributes are not reported as numbers.
  • Delete a script and view again if you need the drawing.

FAQ

Will a script inside the SVG run?

No. The frame is sandboxed, and a script tag also leaves the frame empty.

Why is the sample two start tags?

One svg element and one circle element. Closers are not counted as start tags.

Are width and height reported?

No. Look at the frame for the drawing. The text report is tags and scripts.

What about a path?

A path start tag is counted by its name. The d attribute is not interpreted.

Is HTML accepted?

The census will count whatever tags you paste. The frame is intended for SVG.

Is the markup uploaded?

No. The count 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.