CSS Clip-Path Generator - Free Polygon Shape Maker Online

Search Engine Optimization
  1. Home
  2. Developer Tools
  3. CSS Clip-Path Generator
Share: Report

CSS Clip-Path Generator

100% free · Runs 100% in your browser · No signup needed

Click the preview to add a point · drag a point to move it · double-click a point to delete it (minimum 3 points).

Background color
Border radius: 0px
Preview text

Honest note: clip-path only hides pixels visually — the clipped content stays in the DOM, still loads, and can still be reached by keyboard and screen readers. Do not use it to hide sensitive content.

Try an example: star shape

About CSS Clip-Path Generator

What Is the CSS Clip-Path Generator?

The CSS Clip-Path Generator is a free online tool that lets you build custom shapes with CSS clip-path and copy the code straight into your project. Instead of writing percentage coordinates by hand and guessing how they will look, you drag points on a live preview, or start from a preset, and the tool writes the polygon code for you. It is made for web designers and developers who want hero sections with angled edges, hexagon avatars, star badges, arrow buttons, speech bubbles, and other non-rectangular shapes without images, extra markup, or heavy graphics files.

Everything on the web starts as a rectangle. Text blocks, images, buttons, and sections are all rectangles by default, and that is why so many websites look like stacks of boxes. The clip-path property breaks that habit. It defines a visible region inside an element, and anything outside that region is clipped away from view. The element itself keeps its size and position in the layout, but only the clipped shape is painted on screen. That simple idea unlocks diagonal section dividers, pointed banners, and playful card shapes with a few lines of pure CSS.

How clip-path Polygon Works

The polygon function takes a list of coordinate pairs, written as clip-path: polygon(x1% y1%, x2% y2%, and so on). Each pair is one vertex, or corner, of the shape, and the browser joins the vertices in order to form the visible region. The percentages are the key detail: percentage coordinates scale with the element. A point at 50% 0% is always the top centre, whether the element is 200 pixels wide or 1200 pixels wide, and a point at 100% 100% is always the bottom-right corner. That means a percentage polygon is naturally responsive. Resize the browser, and the shape stretches smoothly with its element, keeping the same proportions.

You can also use pixel values, but pixels do not scale, so a pixel polygon that looks perfect on desktop can break on a narrow phone screen. For layout shapes such as section dividers and cards, percentages are almost always the better choice, and this tool outputs percentages by default. The order of points matters too. Points should be listed in order around the shape, either clockwise or anticlockwise, without jumping across the shape. If the order is wrong, edges cross and the shape folds into an unexpected form, which is one of the most common beginner mistakes.

Presets Included in This Tool

Starting from a preset is faster than plotting every point yourself, and the presets in this tool cover the shapes people actually use. The triangle gives a simple pointed banner or play-button shape with three vertices. The diamond is a rotated square, useful for badges, icons, and decorative tiles. The pentagon and hexagon are classic badge and avatar shapes, with the hexagon especially popular for profile pictures and feature icons. The octagon is a softer, stop-sign-like frame that works well for cards and buttons. The star is ideal for ratings, favourites, and celebration badges, while the arrow points the eye in a direction and works for call-to-action blocks. The chevron creates a bold, angled divider or step indicator, and the message bubble gives a chat-style shape for testimonials and comments.

Every preset is fully editable. Load a preset, then drag its points, add a new vertex where you need a sharper corner, or delete a point you do not need. The live CSS output updates as you edit, so you always copy the exact shape you see. You can also adjust the preview background and border radius controls to test how the shape looks with your own colours before you paste the code into a real page.

How to Use This Tool

  1. Pick a preset from the gallery, or start with the default shape and build your own from scratch.
  2. Drag any point on the preview to reshape it. Add a point by clicking an edge, and delete a point you no longer need.
  3. Watch the live CSS output update. It includes both the standard clip-path declaration and the Safari fallback described below.
  4. Copy the code and paste it into your stylesheet, applying it to a div, section, image, or button.
  5. Test the shape at mobile and desktop widths. Because the coordinates are percentages, it should scale cleanly, but always check small screens.
  6. Combine clip-path with a background colour, gradient, or image for the full effect, and keep the content inside the shape with sensible padding.

Honest Labels and Things You Must Know

First, the accessibility note: clipped-away pixels are still in the DOM. Clipping only hides pixels from view; it does not remove content, links, or text from the document, and it does not change what a screen reader reads or what a search engine indexes. That is good news for accessibility and SEO, but it also means you must not use clip-path to hide content you want kept private or removed. If content should not be there, remove it from the markup, not just from view. It also means interactive elements in the clipped area may still be reachable by keyboard even though they are invisible, so keep clipped regions free of buttons and links, or test keyboard navigation carefully.

Second, the Safari note: Safari needs the -webkit-clip-path prefix. This tool outputs both declarations, with -webkit-clip-path first and the standard clip-path second, so the shape works in Safari as well as in Chrome, Edge, and Firefox. Copy both lines together and keep them in that order. If you paste only the standard line, Safari users may see an unclipped rectangle instead of your shape.

Third, the animation note: you cannot animate a change in vertex count with clip-path. A browser can smoothly interpolate between two polygons only when both have the same number of vertices, moving each point from its start position to its end position. A triangle cannot morph into a star, because the vertex counts differ, and the browser will simply jump between the two shapes. If you want an animated shape change, design both states with the same number of points, even if some points sit on top of each other in one state.

Practical Tips for Beautiful Clip-Path Shapes

  • Keep shapes simple. Three to eight points usually look cleaner than a jagged twelve-point polygon, and simple shapes scale better.
  • Use clip-path for decoration, not for critical layout. The element still takes up its full rectangular space in the layout, so a clipped triangle still reserves a rectangle of space around it.
  • Leave breathing room inside the shape. Text near a slanted edge can get clipped on small screens, so add padding and test narrow widths.
  • Pair angled shapes with generous whitespace. A diagonal hero divider looks striking when the sections around it have room to breathe.
  • Prefer gradients and images as backgrounds inside clipped elements. A flat colour works, but a gradient makes an angled shape feel intentional rather than accidental.
  • Check contrast on the clipped background. A shape is only useful if the text on top of it stays readable at every screen size.

Clip-path works beautifully alongside other CSS tools. Clean up pasted code with the CSS Beautifier, add depth with the Box Shadow Generator, build the layout around your shape with the Flexbox Generator, and style the buttons inside it with the CSS Button Generator.

When your new design is ready to go live, FistHost shared hosting starts at just $0.99 per month, and an annual plan includes a free domain, so you can publish your site, portfolio, or landing page without a large upfront cost. Visit FistHost to see the current plans and get started in minutes.

Every FistHost hosting plan, starting at just $0.99 per month, is built for real websites, with fast loading, simple setup, and support when you need it, and the free domain with an annual plan means your new site can have a proper address from day one. Visit FistHost to choose a plan and launch your site today.

User Reviews

No reviews yet. Be the first to review this tool!

Write a Review

★★★★★

Captcha

Reviews are protected by captcha and moderated before they appear.


Pro

Built for Creators

Fast hosting for blogs,
stores and portfolios

Create Now
FistHost Hosting That Grows With You Start at $0.99/mo and scale · when you are ready Start Growing