SVG Polygon Generator
Generate a regular SVG polygon with any number of sides, custom radius, fill and stroke, and copy the clean SVG code to use anywhere.
Last reviewed by the Radiatus Cloud team
Generate a regular polygon as clean, scalable SVG code.
Need this done properly for your business?
Radiatus delivers secure cloud, DevOps & compliance engineering.
Generate regular polygons as SVG
A regular polygon has equal sides and equal angles, and this generator draws one with any number of sides from a triangle upwards. Choose the number of sides, the radius from the centre to each corner, and the fill and stroke colours, and it produces clean SVG code you can paste into a web page, design file or icon. Six sides make a hexagon, five make a pentagon, and three make an equilateral triangle, all perfectly proportioned.
The shape is computed with trigonometry so every vertex sits exactly on a circle, giving a true regular polygon at any size.
Why SVG for shapes
SVG shapes are vector graphics, so they stay crisp at any size without the blurring that affects bitmap images when scaled up. They are also small, editable as plain text, and styleable with CSS, which makes them ideal for icons, backgrounds and decorative elements. Because the output is a single polygon element, it is easy to adjust the colours or size by hand afterwards.
The generated code is self-contained and standards-compliant, so it works in browsers, design tools and anywhere SVG is supported. Everything is produced locally in your browser.
Related tools
- EXIF Viewer — Extract hidden EXIF data (Camera, GPS, Settings) from images.
- Favicon Generator — Generate favicons and app icons at every required size from one source image, with the exact HTML to reference them.
- Placeholder Image Generator — Generate placeholder images at any size with custom colours and label text. Produced in your browser as downloadable files, no external hotlinking.
- Image Resizer — Resize images in your browser with aspect ratio control and format conversion. Files are processed locally and never uploaded.
Frequently Asked Questions
How many sides can the polygon have?
Any number from three upwards. Three makes a triangle, four a square, six a hexagon, and higher counts approach a circle.
What does the radius control?
It is the distance from the centre to each corner, which sets the overall size of the polygon.
Can I change the colours later?
Yes. The output is plain SVG, so you can edit the fill and stroke attributes by hand or style them with CSS.
Why use SVG instead of an image?
SVG is a vector format that stays sharp at any size, is small in file size, and can be styled and edited as text.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Set the number of sides, radius and colours, then generate.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
EXIF Viewer
ImageExtract hidden EXIF data (Camera, GPS, Settings) from images.
Favicon Generator
ImageGenerate favicons and app icons at every required size from one source image, with the exact HTML to reference them.
Placeholder Image Generator
ImageGenerate placeholder images at any size with custom colours and label text. Produced in your browser as downloadable files, no external hotlinking.