SVG Dimensions Analyzer — ViewBox & Size Inspector
Understand exactly how an SVG is sized. The analyzer reports the declared width and height, parses the viewBox into its origin and dimensions, computes the aspect ratio, and explains how the image will scale when its container changes size.
Features
- Reads declared width/height attributes and their units
- Parses viewBox into min-x, min-y, width, and height
- Computes aspect ratio and flags mismatches between viewBox and display size
- Explains scaling behavior (preserveAspectRatio) in plain language
How it works
- Paste SVG code or upload a file.
- Read the instant geometry report: size, viewBox, aspect ratio.
- Use the findings to fix rendering or scaling issues in your layout.
Frequently asked questions
Why does my SVG render at the wrong size?
Usually the width/height attributes conflict with the CSS sizing, or the viewBox aspect ratio differs from the display box. The analyzer surfaces both so you can spot the mismatch.
What happens if an SVG has no viewBox?
Without a viewBox the SVG cannot scale proportionally — it renders at fixed pixel dimensions. The analyzer flags missing viewBox attributes so you can add one.
All processing happens locally in your browser — your SVG code is never uploaded to a server.