🟦 SVG Shape Generator

Create custom SVG shapes – rectangle, circle, ellipse, line, polygon, polyline. Live preview & code

Version 1.0.0 – Updated April 2025
?
Choose the SVG shape you want to create.

👁️ Live Preview

📋 SVG Code

<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="160" height="160" fill="#667eea" stroke="#2c3e50" stroke-width="2" /> </svg>

Embed This Tool

Want to embed this SVG shape generator on your website? Use this code:

<iframe src="https://yoursite.com/svg-shape-generator" width="100%" height="600" frameborder="0"></iframe>

📘 SVG Shape Examples

🟦 Rounded Rectangle

<rect x="10" y="10" width="180" height="80" rx="15" ry="15" fill="#3498db" stroke="#2c3e50" stroke-width="2"/>

⭕ Circle

<circle cx="100" cy="100" r="80" fill="#e74c3c" stroke="#c0392b" stroke-width="3"/>

🔶 Polygon (Star)

<polygon points="100,10 40,198 190,78 10,78 160,198" fill="#f1c40f" stroke="#e67e22" stroke-width="2"/>

📏 Line with markers

<line x1="20" y1="180" x2="180" y2="20" stroke="#2ecc71" stroke-width="4" stroke-linecap="round"/>

📖 SVG Tutorials

📐

Understanding SVG coordinates

The viewBox, coordinate system, and how to position shapes.

Read Tutorial →
🎨

Styling SVG: fill, stroke, and opacity

How to use colors, gradients, and patterns in SVG.

Read Tutorial →
🔄

Transformations and animations

Move, scale, rotate, and animate SVG elements.

Read Tutorial →

⚖️ SVG Tool Comparison

Feature Our Tool Tool A Tool B
Free & unlimited ❌ (limit)
6 shape types
Live preview
Dynamic shape fields
Preset polygons (triangle, star, etc.)
Download SVG file
Client-side / private

❓ Frequently Asked Questions

What is SVG?

SVG (Scalable Vector Graphics) is an XML‑based format for vector images. It scales perfectly to any size without losing quality and can be styled with CSS and manipulated with JavaScript.

How do I use the generated SVG code?

You can copy the code and paste it directly into your HTML. You can also download the SVG file and use it as an image.

What do x, y, cx, cy mean?

For a rectangle, x and y are the top‑left corner coordinates. For a circle, cx and cy are the center coordinates. All coordinates are relative to the SVG viewBox.

Can I create complex shapes?

This tool focuses on basic shapes. For complex paths, you would need a full vector editor. But you can combine multiple shapes from this generator.

📝 Version History

Version 1.0.0 – Initial release

April 16, 2025
  • 🚀 6 shape types: rect, circle, ellipse, line, polygon, polyline
  • 🎛️ Dynamic fields for each shape type
  • 🎨 Fill color, stroke color, stroke width, opacity
  • 📐 Adjustable SVG width & height
  • 🔺 Preset polygons: triangle, square, pentagon, hexagon, star
  • 👁️ Live preview
  • 📋 Copy SVG & download .svg file

🧠 Why use SVG?

SVG is the standard for vector graphics on the web. It's lightweight, scalable, and interactive. Use it for icons, logos, illustrations, and data visualizations that must look sharp on any screen.

📱 Responsive

SVG scales seamlessly – no pixelation.

⚡ Performance

Often smaller file size than raster images.

🎨 Stylable

Change colors with CSS, animate with JavaScript.

🛠️ Recommended Design Resources

Tools to master SVG