SVG Shape Generator
Create custom SVG shapes with adjustable dimensions, colours, stroke, rotation and corner radius. Preview the result and copy or download the generated SVG code.
SVG Shape Generator
Choose a shape, customise its appearance and dimensions, then copy or download the SVG markup generated by the tool.
Used by rectangles and rounded rectangles.
Live Preview
300 × 200 viewBox<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200">
<rect x="2" y="2" width="296" height="196" rx="20"
fill="#0067F0" stroke="#00162B" stroke-width="4"/>
</svg>
What Is an SVG Shape Generator?
An SVG Shape Generator is a browser-based tool for creating scalable vector shapes using SVG markup. SVG, or Scalable Vector Graphics, is a web-friendly vector format that can be resized without the pixelation associated with raster images.
This generator provides a visual way to create common SVG shapes without manually writing the underlying XML markup. Choose a shape, change its dimensions and appearance, preview the result and copy the generated SVG code for use in websites, applications, graphics and design projects.
Why Use the SVG Shape Generator?
Generating simple SVG graphics manually can involve working with coordinates, viewBox values and individual SVG elements. This tool provides an easier visual workflow while still giving you the underlying SVG markup.
Multiple Shapes
Create rectangles, rounded rectangles, circles, ellipses, triangles, diamonds and hexagons.
Custom Dimensions
Adjust the width and height of the generated SVG to suit different design requirements.
Custom Colours
Choose separate fill and stroke colours to create the appearance you need.
Adjustable Rotation
Rotate your shape through a full 360-degree range directly from the generator.
Live Preview
See your SVG update immediately as you change its dimensions and appearance.
Copy or Download
Copy the generated SVG markup or download it as an SVG file for use in another project.
How to Use the SVG Shape Generator
Use the controls to customise the vector shape until the preview matches the design you need.
- Choose a shape — Select a rectangle, rounded rectangle, circle, ellipse, triangle, diamond or hexagon.
- Customise the shape — Adjust the width, height, corner radius, rotation, fill colour, stroke colour, stroke width and opacity.
- Preview the SVG — Review the live vector preview as you make changes.
- Copy or download the SVG — Copy the generated markup to your clipboard or download it as an SVG file.
Create SVG Shapes Online
SVG is particularly useful for web graphics because vector shapes can scale to different display sizes without losing their sharpness. Simple shapes such as circles, rectangles, triangles and polygons can be represented with compact SVG markup, making them practical for interfaces, icons, illustrations, backgrounds and other digital designs.
The SVG Shape Generator makes this process more accessible by producing the underlying SVG code automatically. Instead of manually calculating coordinates for every shape, you can use the visual controls and take the resulting markup into your own HTML, CSS or design workflow.
Using SVG Shapes in Web Design
SVG elements can be embedded directly into HTML or saved as standalone .svg files. Inline SVG can be styled or manipulated with CSS and JavaScript, while standalone SVG files can be used as images and other graphical assets. The generated code from this tool uses standard SVG elements and attributes so it can be adapted to different projects.
Customising SVG Colours and Geometry
SVG supports separate fill and stroke properties, allowing the interior and outline of a shape to be controlled independently. Dimensions, rotation, opacity and other attributes can also affect the final appearance. Combining these controls makes it possible to create simple geometric assets without needing a dedicated graphics application.
Understanding Generated SVG Code
The generated SVG includes a viewBox describing the coordinate system used by the graphic. Shape-specific SVG elements are then placed inside that coordinate system. The exact markup depends on the selected shape, because circles, rectangles and polygon-based shapes use different SVG elements and attributes.
The preview and generated code are created entirely in your browser. The tool does not require an external graphics service to generate the SVG. When you download the result, the file contains the SVG markup produced by the current settings and can be opened or edited in software that supports SVG.
James William Steven Parker
Creator & Developer of YesTools
James William Steven Parker is a web developer and technology professional with extensive experience in web development, web design, SEO, web hosting, systems analysis and cybersecurity. He created YesTools to provide fast, practical and free online tools for everyday tasks and technical work.
Learn more about James and YesToolsFrequently Asked Questions
Explore More Free Tools
Explore the YesTools collection of free online tools, calculators, converters, generators and utilities.
Browse All Categories

