SVG viewBox Editor

Paste your SVG and tweak viewBox, width, and height with live preview

Paste in SVG code and adjust the viewBox's minX, minY, width, and height — plus the width and height attributes — with simple number inputs while a live preview shows the result. It's useful for developers and designers who want to crop an icon, tighten up padding, or visually fix artwork that's getting clipped by a bad viewBox. All parsing and conversion happens inside your browser and nothing is sent to a server.

도구를 불러오는 중…

🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.

How to use

  1. Paste your original SVG markup into the SVG code input box.
  2. The viewBox values from your SVG are filled into the Min X, Min Y, Width, and Height fields automatically.
  3. Tweak the numbers and watch the preview on the right update instantly.
  4. Set the width and height attributes if you need them, then grab the finished SVG code with the copy button.

FAQ

What happens if my SVG has no viewBox?
If the viewBox attribute is missing, the tool estimates a starting viewBox from the width and height attributes and fills it in for you.
Is the SVG I paste sent to a server?
No. It's handled entirely in your browser using DOMParser and XMLSerializer, and nothing is transmitted externally.
What happens if I paste invalid SVG code?
If parsing fails or no SVG element can be found, an error message appears in the preview area.

← Back to all tools

See pricingFree chat consult