SVG Playground

Experiment with SVG in an interactive canvas

A sandbox for building up SVG by hand, combining preset shapes with your own markup and seeing the result immediately. Useful for learning how the coordinate system, viewBox and path syntax actually behave, and for prototyping a shape before writing it into a component.

How to use it

  1. Start from a preset shape or write markup from scratch.
  2. Edit the code and watch the canvas update as you go.
  3. Combine elements, adjust the viewBox, and tune fills and strokes.
  4. Copy the finished SVG out when you are happy with it.

Frequently asked questions

How does the viewBox work?

The viewBox defines the internal coordinate system as min-x, min-y, width and height. The image is then scaled to fill whatever display size you give it. This is why the same markup can be rendered at any size without becoming blurry.

Why is part of my shape cut off?

The shape extends beyond the viewBox bounds. Either enlarge the viewBox dimensions or move the shape into range using its coordinate attributes.

Is my work saved?

No. Everything lives in the current page session and is lost on reload, so copy anything you want to keep.

How do I get my shape out of here?

Copy the markup straight into your project, or send it through the SVG to PNG converter if you need a raster version. Run it through the minifier first if the result is going into production.