SVG Viewer – View, edit, and optimize SVGs

svgviewer.dev

500 points by microflash 15 days ago


lights0123 - 15 days ago

Another web-based SVG tool I use regularly is https://jakearchibald.github.io/svgomg/, an extremely configurable optimizer.

awsidiqi - 15 days ago

Didn’t expect this to blow up on Hacker News on the weekend! We’re a small company based out of Vancouver, BC that creates software tools (https://www.checkersoftware.ca/).

Thanks for posting it and thank you all for your kind words.

Let me know if you have any questions!

rambambram - 15 days ago

Wow! I just fiddled with it a little bit and it seems very useful for when I finally decide to tackle the small problems[1] that I encounter with the SVG's that I use. The UI is easy to understand and it gives clear feedback on changes. I definitely bookmarked this.

[1] The problems that I had with some SVG's is that they seemed to stretch the page wide while loading (in a flash) and then finally settling on their intended size after a split second. I remember that I searched for solutions and fiddled with viewbox, widht and height, but to no avail (they were in the hundreds of pixels). What can I do to mitigate this initial 'stretch'?

Theodores - 15 days ago

Really nice tool. It has a lot in one place. Normally I use phpStorm and that does not have SVGOMG style optimisation things but the code prettifiers work.

This could do with some better examples to start editing with, using different primitives than just path. A grid would be nice too.

Examples, a search icon is a 'circle' and a 'line' with a 'viewbox' to get right, if you place the origin in the centre of the circle then you don't need x and y values, just a radius. In this way a silly level of optimisation can be made.

A typical search icon will have hundreds of points defined with 'NASA numbers' (six decimal places) and that mashed into a path. Really you just need a circle defined in integers, not Adobe Illustrator exported nonsense.

SVG is an artistic medium and I really like it. However, artists don't see it that way and neither do developers. Hence most SVGs are not really in the spirit of what is possible. It is more than just a file format.

vegcel - 15 days ago

SVGs are just so powerful. Last week there was a problem with a parallax transparent image with a filter: drop-shadow looking awful on mac safari and ios. Solution was to create an outline of the image in an SVG and use an svg filter with feGaussianBlur for a drop shadow. I feel like I'm only scratching the surface on what's possible with them. I've been using svgomg for my optimizations, but this looks to have quite a bit more useful features.

fyt2024 - 14 days ago

I use Inkscape. And if I miss something then it is Xara Xtreme or the former free version vor linux

But what does it mean to optimize an SVG?

sipjca - 15 days ago

I love this site, I’ve used it countless times. So useful and super quick to see results and just understand weird svg elements

Thank you to the dev

thenickevans - 15 days ago

This is great. There should be more and better tools for SVGs. Thank you for making this.

breck - 15 days ago

I paid $10 for BoxySVG a couple of years ago on Mac and it's been a solid little tool.

https://boxy-svg.com/

yboris - 15 days ago

This is my favorite resource / tool for messing with SVGs. I've looked around a lot and I can't find better. Thank you to the creator.

alex3305 - 15 days ago

I was generating some SVGs from text last week and thus editor just refused to paarse the generated content. However this viewer worked just fine: https://codebeautify.org/svg-viewer

farhanpatel - 15 days ago

I find myself reaching for this pretty often.

Love little tools like this it fits the spirit of HN perfectly.

notpushkin - 14 days ago

Neat!

There's a slightly more optimal way to encode SVGs as data URI: https://yoksel.github.io/url-encoder/

mariushop - 14 days ago

Excellent. I love that the link takes you straight to the editor, browser keeps the history, clear design, a joy to use. Made me click around just to see who did it so I can applaud a job well done.

Waterluvian - 15 days ago

I’ve been using SVGs in my robot mapping software and it’s amazing how powerful they are. I design them using css custom properties (variables) so that I can style icon colours, borders, etc. at runtime.

albert_e - 14 days ago

Excellent --

The library of SVGs on the left is a great feature in itself. I wish a couple of sites like this become super popular so that all of us can both contribute and utilize great vector art.

noizejoy - 15 days ago

Can this be self-hosted?

tiffanyh - 14 days ago

Doesn't "optimize"

I was expecting the optimization feature to rewrite the SVG to be smaller (less kb).

All the optimize button did was remove whitespace & cartridge returns.

navigate8310 - 14 days ago

Here's another handy tool that I use: https://squoosh.app/

saintradon - 14 days ago

Not sure if this is a bug or not but the zoom feature seems to go infinitely on the canvas, kinda funny and should be kept in maybe.

Arpitbhalla - 14 days ago

I'm using it for quite a while, it's really awesome

namegulf - 14 days ago

this is amazing and very useful tool. was looking for something like this, thank you!

leobg - 15 days ago

You can probably use ChatGPT to generate SVGs from a description of what you want. Like stable diffusion for simple vector graphics. Maybe even animations.

Haven’t yet done it myself and can’t verify right now, but I wouldn’t be surprised if it worked well to brainstorm a favicon or some other symbol.