SVG Shape Generator (Polygon, Star, Badge)
Parametric vector shapes with real rounded corners — as SVG, clip-path or PNG.
Preview
Presets
Shape
Style
Canvas
Export
About the SVG Shape Generator (Polygon, Star, Badge)
Build clean vector shapes from a few numbers: regular polygons with any number of sides, stars with adjustable points and inner radius, starbursts, scalloped badges, gears with a centre hole, crosses, single and double arrows, hearts, speech bubbles and spirals. Round the corners with true circular fillets, rotate the shape, and fill it with a solid color, a gradient or just an outline.
Export the result as an SVG file or its path data, as a CSS clip-path: polygon() that turns any element into the shape, or as a transparent PNG at the size you need. Everything is generated in your browser.
How to use it
- Pick a preset or choose a shape type, then drag its sliders — sides, points, inner radius, teeth, tail position and so on.
- Set Corner rounding (and Inner rounding for stars, starbursts and gears) to soften the corners.
- Under Style, choose a solid, gradient or outline fill and an optional stroke; under Canvas, set the size, padding and rotation.
- Pick SVG, Path or CSS clip-path under Export and copy it, or download the SVG or a PNG at any width up to 8,192 px.
Examples
Polygon · 3 sides · 200 × 200 px · padding 0
clip-path: polygon(50% 6.7%, 100% 93.3%, 0% 93.3%);
An equilateral triangle keeps its proportions, so it is centred with a margin above and below. Give the element a different aspect ratio to stretch it.
Star · 5 points · 100 × 100 px · padding 0
M50 2.45L61.74 38.86L100 38.77L69 61.19L80.9 97.55L50 75L19.1 97.55L31 61.19L0 38.77L38.26 38.86Z
Polygon · 6 sides · rounding 35% · 120 × 120 px
M96.98 15.02L117.44 50.46A19.08 19.08 0 0 1 117.44 69.54L96.98 104.98 …Z
Each corner is a circular arc (A command) that meets both edges smoothly.
Common uses
- Icons and UI decorations: hexagon avatars, star ratings, badges, “new” and “sale” starbursts.
- Cutting images and sections into shapes with
clip-path, without extra markup. - Logos, stickers and illustrations that need exact, editable geometry.
- Laser cutting, vinyl and embroidery templates that need clean vector outlines.
How the shapes are built
A regular polygon puts its corners evenly on a circle (with a flat bottom edge); a star alternates between the outer radius and the inner radius you choose (about 38% gives the classic five-pointed star). A starburst is a star with many short points. A badge joins points on a circle with outward circular arcs whose depth you set. A gear has trapezoid teeth with separate tip and root widths, whose tips and roots are true circular arcs, and its centre hole is a circle cut out with the evenodd fill rule. A spiral is an Archimedean spiral (radius growing evenly with the angle) drawn as a band with cubic Bézier curves; the heart is six cubic curves; the arrow, cross and speech bubble are polygons.
The path data uses the commands of SVG 2 path data: M and L for straight edges, A for circular arcs, C for curves and Z to close.
Rounded corners that stay round
Rounding replaces each corner with a circular arc that touches both edges. Where two edges meet at an angle θ, an arc of radius r touches them at a distance t = r ÷ tan(θ/2) from the corner. The rounding percentage sets t as a share of the most a corner can take — half of its shorter edge — so neighbouring arcs never overlap, and the same percentage gives matching corners on a regular shape. At 100%, a square becomes a circle.
On a gear, a corner joins a straight flank to the circular tip or root, so its fillet touches the flank and that circle; the percentage is a share of the largest fillet that keeps to its half of the flank and of the arc. At 100% on both, the teeth become smooth waves.
Using the CSS clip-path
CSS clip-path: polygon() (CSS Shapes 1) accepts only straight edges, so curves and rounded corners are traced with straight segments that stay within 0.06% of the canvas size of the true curve (a quarter of a pixel on a 400 px canvas). Coordinates are percentages of the element’s box, so the shape scales with the element; the snippet sets an aspect-ratio that matches your canvas. Shapes with a hole use polygon(evenodd, …), with the hole joined to the outline by a zero-width cut. A clip-path cuts out the element’s background, so for an outline or a stroke use the SVG instead.
Limitations
- The CSS polygon() is a close approximation of curved and rounded edges, not an exact copy; use the SVG when curves must be perfectly smooth at large sizes.
- clip-path cannot draw strokes or outlines — those export only as SVG and PNG.
- PNG exports go up to 8,192 px per side, a limit this tool sets so that iPhones and iPads (whose browsers cap a canvas at 8,192 × 8,192 pixels) can make them; phones may still run out of memory above about 4,096 px. The SVG has no size limit.
- With sharp (miter) stroke corners the shape is drawn a little smaller, so that the pointed ends of the stroke stay inside the padding. Corners sharper than about 29° get a bevel instead, the SVG default (stroke-miterlimit 4).
- The canvas is 16 to 4,096 px per side; the shape is scaled to fit it, keeping its proportions.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How do I make a hexagon or a triangle with rounded corners?
Choose Polygon, set the number of sides, and raise Corner rounding. The Rounded hexagon and Rounded triangle presets are good starting points.
How do I use the shape on an image?
Copy the CSS clip-path and apply it to the image (or to any element): img { clip-path: polygon(…); }. The percentages scale with the element, so it works at any size.
Why is my shape not stretched to the whole canvas?
Shapes keep their proportions and are centred in the canvas. To stretch one, give the canvas the aspect ratio you want, or apply the clip-path to an element with a different aspect ratio.
What does “Keep size when rotating” do?
Normally the rotated shape is scaled to fill the canvas, so its size changes with the angle. With this fit, the shape is sized by the circle around it, so every rotation has the same size — handy for icon sets and animation frames.
Can I edit the SVG in Figma, Illustrator or Inkscape?
Yes. The file is a single <path> with plain M, L, A, C and Z commands, colors as 6-digit HEX (with separate opacity attributes) and a gradient definition when you use one.
Is anything uploaded?
No. The shapes, the SVG and the PNG are all made in your browser, and the page works offline once loaded.