Aspect ratio calculator & sanitized SVG viewer
Solve exact simplified aspect ratios (such as 16:9 or 4:3) and scaled pixel dimensions—plus preview pasted SVG markup safely with executable scripts stripped.
16:9 → 1280×720
Processing runs inside your browser without accounts or server uploads. Modular TypeScript domain logic tested locally.
Report a problem with this toolDefanged SVG rendering
XSS sanitization: Removes <script>, <foreignObject>, inline on* handlers, and javascript: links before rendering preview images via sandboxed image tags.
Frequently asked questions
- Is it safe to inspect untrusted SVG code here?
- We strip known active script vectors and render via non-interactive <img> data URIs rather than raw DOM innerHTML.
- How does target width scaling work?
- Enter your source ratio dimensions and a new target width to compute proportional height rounded cleanly to pixels.
Related tools
Browse all toolsImage tools
Image resizer
Resize PNG, JPEG, and WebP images to exact pixel dimensions with optional aspect-ratio locking locally.
Image tools
Image specs & print DPI inspector
Inspect exact pixel dimensions, file size, megapixels, simplified aspect ratio, and 72/150/300 DPI print sizes.
Image tools
Favicon generator
Generate a multi-frame favicon.ico plus 180px Apple Touch and 192/512px PNG app icons in a local ZIP.