Tested tool guide
Tested browser tools
Checked August 16, 2026
What SVG ViewBox Editor does, with a checked example
Every SVG carries two independent rectangles: width and height, which size the element on the page, and viewBox, which selects the slice of the drawing that fills it. This tool takes your markup, puts the viewBox, width, and height into editable fields, and redraws the artwork after every change so you can watch the coordinate window slide across the drawing. The detail most people get wrong: content outside the viewBox is not shrunk to fit, it is clipped entirely, which is exactly how a healthy SVG can render as an empty box.
Worked example
A concrete input and expected output from the current implementation.
Input
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="50 50 100 100">
<rect x="0" y="0" width="40" height="40"/>
</svg>
->
Expected output
The preview renders an empty 100x100 box. The viewBox '50 50 100 100' maps the user-coordinate window x 50-150, y 50-150 onto the full viewport, and the rect spans only x 0-40, y 0-40, entirely outside that window, so every pixel is clipped. With viewBox '0 0 100 100' the same rect occupies the top-left 40x40 pixels.
A viewBox names the rectangle of the drawing that fills the element; everything outside is cut, not compressed. The rect's bounds do not intersect the visible window, so nothing survives.