What if I need to diagnose the path itself?
Use SVG Path Clinic for path geometry. The viewBox simulator computes viewport mapping from numeric inputs.
Runs in your browser. No file uploads for processing.
Preview SVG viewBox alignment, letterboxing and cropping. Get preserveAspectRatio and transform values.
Loading tool...
Use the four viewBox values from your SVG and the intended viewport width and height. Negative viewBox origins are supported.
For a 120 × 80 viewBox in a 320 × 180 viewport, centered meet scales uniformly to 270 × 180 and leaves 25 pixels on each side. Slice fills the viewport and crops; none stretches to fit.
Use the generated viewBox and preserveAspectRatio attributes, or save the coordinate transform, visible rectangle and edge measurements as JSON.
The tool processes inputs in your browser. Account features and usage analytics are separate.
Use SVG Path Clinic for path geometry. The viewBox simulator computes viewport mapping from numeric inputs.
Meet scales uniformly until the full viewBox fits; extra viewport space becomes padding. Slice scales uniformly until the viewport is covered, so some source area may be clipped.
Not necessarily. It uses separate horizontal and vertical scales, so the source can stretch.
Yes. The transform first accounts for the viewBox origin and then applies alignment in the viewport.
Padding is unused space in the output viewport. Crop describes the source coordinates outside the visible rectangle.
No file is needed. Enter the numeric viewBox and viewport values; the preview only renders a generated diagram.
For meet and slice, Min, Mid and Max select each edge or center. With none, alignment is ignored because each axis fills the viewport.