CSS Clip Path Generator
Create custom CSS clip-path shapes visually. Adjust polygon points, circles, ellipses, and insets, preview your design live, and copy or download production-ready CSS.
Shape Editor
| # | X (%) | Y (%) | Remove |
|---|
Enter a supported clip-path value. Only polygon, circle, ellipse, inset, path, rect and xywh are accepted.
Live Preview
Only used for local preview. Nothing is uploaded.
Generated CSS
Polygon · 3 pointsAll Developer Tools
Browse free online tools for JSON, HTML, CSS, XML, JavaScript, data conversion, and everyday development tasks.
Try a different search term or select another category.
What Is CSS Clip Path?
The CSS clip-path property lets you control which parts of an HTML element remain visible. It creates a clipping region that can turn a rectangular image, container, button, or other element into a triangle, circle, hexagon, star, diagonal shape, or custom polygon.
Anything outside the defined clipping region becomes visually hidden, while the element itself remains in the document layout. This makes clip-path useful for creating creative image masks, geometric backgrounds, angled sections, decorative cards, and distinctive user interface elements without requiring a separate image for every shape.
A CSS Clip Path Generator makes this process easier by helping you create shapes visually and generate the corresponding CSS code. Instead of manually calculating every coordinate, you can start with a preset, adjust the shape, preview the result, and copy the CSS into your stylesheet.
Example of a CSS Triangle
This example creates a triangle using three coordinate points. The first point is centered at the top, while the remaining points define the lower-right and lower-left corners.
Example of a Hexagon Shape
The polygon coordinates define the six sides of the hexagon. Applying the class to an image or container clips the visible content into that shape.
Remember: CSS clip-path changes the visible shape of an element, not its underlying layout dimensions. The original element still occupies its layout space even when portions of it are clipped.
What Is a CSS Clip Path Generator?
A CSS Clip Path Generator is a visual tool for building CSS clipping shapes without writing all the coordinates manually. Depending on the controls provided, you can select a preset, adjust individual points, change shape dimensions, and preview how the clipping region affects an element.
The generator produces a CSS clip-path declaration that you can copy into your project. Supported shapes may include polygons, circles, ellipses, and inset rectangles. The exact options available depend on the generator's interface.
Create Shapes Without Guesswork
Start with a predefined geometric shape and adjust its points or dimensions to achieve the appearance you need.
Generate Copy-Ready Code
Turn your selected shape and settings into a CSS clip-path declaration that can be added to a stylesheet.
Visual generation is especially useful when you need precise diagonal edges, multi-point shapes, or custom image masks. It also helps beginners understand the relationship between coordinate values and the final clipped result.
How to Use the CSS Clip Path Generator
Creating a CSS clipping shape is straightforward when you can see the result while adjusting it. Follow these steps to prepare a shape and use its generated CSS in your project.
Start with a triangle, circle, diamond, hexagon, star, arrow, parallelogram, or another available shape that suits your design.
Adjust coordinate points or the available controls to change the shape's angles, proportions, position, size, and other supported properties.
Inspect how the clipping region looks on the sample element or background. Make further adjustments until the visible shape matches your design.
Copy the clip-path declaration produced by the tool and paste it into the CSS class that controls your image or HTML element.
Apply the CSS to your actual element and check the result at different screen sizes, especially when the design uses percentage-based coordinates.
For best results, check the generated declaration before using it in production. Confirm that the selector targets the correct element and that the clipping shape works with your image dimensions, content, and responsive layout.
Key Features of a CSS Clip Path Generator
A visual clip-path tool can make custom CSS shapes faster to build, easier to preview, and simpler to reuse. The available functionality depends on the controls supported by the individual generator.
Visual Shape Preview
Inspect the clipping effect as you adjust the shape, helping you understand how the CSS changes the visible portion of an element.
Ready-Made Shape Options
Use common shapes such as triangles, diamonds, hexagons, stars, arrows, and parallelograms as starting points for your design.
Polygon Point Editing
Customize a polygon by changing its coordinate points to create unique outlines, angled edges, and multi-point shapes.
Multiple CSS Clip Paths
Work with commonly used clip-path functions such as polygon(), circle(), ellipse(), and inset(), where supported by the generator.
Adjust Shape Dimensions
Use available controls to fine-tune coordinates, centers, radii, inset values, or rounded corners for your preferred shape.
Copy-Ready Declarations
Generate CSS that can be reused on suitable HTML elements in websites, landing pages, portfolios, and application interfaces.
Not every generator provides the same editing features or export formats. If you need a specific output, such as a Tailwind CSS class, React component, or SVG path, verify that the tool supports that format before relying on it.
Supported CSS Clip Path Shapes
The CSS clip-path property supports several basic shape functions. Each one serves a different purpose, from creating geometric polygons to clipping an element into a circle or a smaller rectangular region.
| Shape Type | CSS Syntax | Common Uses |
|---|---|---|
| Polygon | polygon(x1 y1, x2 y2, ...) |
Triangles, hexagons, stars, arrows, diamonds, and custom geometric shapes. |
| Circle | circle(radius at x y) |
Circular image crops, round profile pictures, badges, and decorative elements. |
| Ellipse | ellipse(rx ry at x y) |
Oval image masks, elliptical areas, and curved design elements. |
| Inset | inset(top right bottom left) |
Rectangular crops, inset panels, and clipped regions with optional rounded corners. |
1. Polygon
The polygon() function creates a shape using a series of coordinate pairs. Each pair defines a point along the polygon's boundary. The browser connects the points in the order provided and closes the shape to create the clipping region.
Polygon is one of the most flexible options because you can define different numbers of points to produce many kinds of geometric shapes.
2. Circle
The circle() function defines a circular clipping region. You can specify a radius and optionally provide a position for the circle's center.
This example creates a circular crop centered within the element's reference box.
3. Ellipse
The ellipse() function creates an oval clipping region with separate horizontal and vertical radii. It is useful when a circle is too restrictive for the shape you need.
The two radius values determine the horizontal and vertical dimensions of the ellipse, while the final values position its center.
4. Inset
The inset() function clips an element to a smaller rectangular area. You can define the distance from each side and optionally use rounded corners.
This example leaves a smaller rectangular visible region inside the original element. The inset values control how much of each side is clipped.
Choosing a shape: Use polygon() for custom geometric outlines, circle() for round crops, ellipse() for oval shapes, and inset() for rectangular clipping with optional rounded corners.
Popular CSS Clip Path Presets
Presets provide a quick starting point for common shapes. You can use them as they are or modify their coordinates to create a shape that better fits your design.
Triangle
Use a three-point polygon for directional indicators, decorative banners, image crops, and simple geometric accents.
Diamond
Create a four-point diamond for decorative tiles, image masks, badges, and visual highlights.
Hexagon
Use six coordinate points to create a hexagonal mask for profile images, product visuals, and feature graphics.
Parallelogram
Angle opposite edges to create a slanted shape for banners, image panels, and contemporary page sections.
Arrow
Create a directional outline for call-to-action elements, step indicators, navigation visuals, and banners.
Diagonal Card
Clip a corner or angle an edge to create a distinctive card or a section with a geometric finish.
These presets are examples of polygon-based clipping. Their appearance can change with the element's aspect ratio, dimensions, and coordinate values, so preview them on the actual content before finalizing the design.
Example: Create a Hexagon Image Mask with CSS
A hexagon image mask is a practical example of CSS clip-path in use. Instead of editing an image file to remove its corners, you can apply a polygon clipping region directly to the image element.
Step 1: Define the CSS Shape
Step 2: Apply the Class to an Image
The clip-path declaration defines the visible six-sided region, while object-fit: cover helps fill the specified image dimensions without distorting the image's aspect ratio. Replace the sample image path with the image used in your project.
Tip: The clipping shape can be applied to images and other suitable HTML elements. For important images, provide appropriate alternative text and check how the crop affects the visibility of the subject.
Common Uses of CSS Clip Path
CSS clip-path is useful in web design whenever a standard rectangular element needs a more distinctive outline. It can be applied to images, containers, decorative sections, and other HTML elements to create a range of visual effects.
Image Masks
Crop photos into circles, hexagons, triangles, diamonds, and other custom shapes without creating a separate image for each mask.
Hero Sections
Create angled backgrounds, diagonal edges, and geometric image reveals for landing pages and introductory sections.
Section Dividers
Design slanted edges, pointed transitions, and zigzag-like visual boundaries between page sections.
Buttons and Call-to-Action Elements
Build arrow-shaped buttons, chevrons, ribbons, and other non-rectangular interface elements.
Product and Feature Cards
Give product images, feature panels, and promotional cards a recognizable geometric appearance.
Profile Pictures and Avatars
Transform profile images into circles, hexagons, or other masks that match the style of a website or application.
Speech Bubbles
Construct custom polygon shapes for chat-style panels, testimonials, annotations, and decorative callouts.
Portfolio and Gallery Layouts
Create distinctive image tiles and geometric galleries that give a portfolio or creative project a unique visual structure.
CSS Clip Path vs. Border Radius
Both clip-path and border-radius can change an element's visible outline, but they are designed for different kinds of shapes. Border-radius is ideal for rounded corners, while clip-path can create more complex geometric clipping regions.
| Feature | CSS clip-path | CSS border-radius |
|---|---|---|
| Main purpose | Clips an element to a defined shape. | Rounds the corners of an element. |
| Shape options | Polygons, circles, ellipses, insets, and other supported clipping paths. | Rounded rectangles, circles, and elliptical corner curves. |
| Typical appearance | Geometric edges or custom outlines. | Smooth rounded corners. |
| Best uses | Arrows, diagonal sections, stars, hexagons, and custom image masks. | Cards, buttons, containers, and circular avatars. |
| Layout behavior | Does not change the element's original layout box. | Does not change the element's original layout box. |
| Complex shapes | Supports many custom geometric clipping regions. | Designed primarily for corner rounding. |
Example Using Border Radius
Example Using Clip Path
Use border-radius when you only need rounded corners. Choose clip-path when the design requires angled edges, multiple polygon points, or other non-rectangular clipping shapes.
Creating Responsive CSS Clip Path Shapes
A clipping shape should work well across the different sizes at which an element may appear. Percentage-based coordinates are often helpful because they describe positions relative to the element's reference box rather than fixed pixel locations.
For example, a triangle defined with percentage coordinates can adapt to a container that becomes wider or narrower. The overall appearance may still change when the element's aspect ratio changes, so responsive designs should be tested at common mobile, tablet, and desktop sizes.
Example of Percentage-Based Coordinates
The width can adapt to its container, while aspect-ratio establishes a preferred relationship between the element's width and height. The polygon uses percentage values to define its clipping boundary.
Responsive tip: Preview your shape at different dimensions. A polygon that looks balanced on a wide desktop container may look narrower or taller on a mobile screen because the element's proportions have changed.
CSS Clip Path Browser Support
The commonly used clip-path shape functions are supported in modern versions of major web browsers. However, behavior and available syntax can vary with older browser versions, so it is important to test your implementation in the browsers used by your audience.
| Browser | General Support | Recommendation |
|---|---|---|
| Google Chrome | Supported in modern versions. | Test the shape with your target Chrome versions. |
| Mozilla Firefox | Supported in modern versions. | Check that coordinate values and clipping behavior match your design. |
| Safari | Supported in modern versions. | Test older Safari versions if you need broad compatibility. |
| Microsoft Edge | Supported in modern versions. | Check the layout and clipping result in your target versions. |
| Internet Explorer | Limited support for the standard property. | Provide a suitable fallback if older environments must be supported. |
Some implementations include the -webkit-clip-path declaration alongside the standard clip-path property for compatibility with certain older WebKit-based environments.
Adding a prefixed declaration may help with selected older browsers, but it does not guarantee support everywhere. Test the features and browser versions relevant to your project rather than relying on the prefix alone.
Important Things to Know About CSS Clip Path
Clip-path provides a flexible way to control an element's appearance, but there are a few important considerations when using it in a production layout.
It Does Not Change Layout
Clipping changes which pixels are visible, but the original element continues to occupy its normal layout space. Nearby elements are not automatically rearranged to fit the clipped outline.
Content May Be Hidden
Important image details, text, or controls can end up outside the visible clipping region. Make sure the clipped result still communicates the intended content.
Use Suitable Coordinates
Incorrect points or values can produce an unexpected shape. Check the coordinate order, shape dimensions, and the proportions of the element being clipped.
Test Different Screen Sizes
Percentage coordinates can scale with an element, but its appearance may change when the width-to-height ratio changes. Preview important shapes across responsive breakpoints.
Consider Interaction and Accessibility
Do not assume that a clipped visual area automatically defines the exact interaction or accessibility behavior of the element. Test interactive controls and provide appropriate labels and alternative text.
Use SVG for Complex Artwork
Clip-path is useful for many geometric masks, while highly intricate illustrations or shapes that need more advanced path editing may be better suited to SVG.
Design tip: Keep important text and interactive controls inside the visible clipping region. A visually attractive shape should not hide essential information or make an interface difficult to use.
Frequently Asked Questions
What is a CSS Clip Path Generator?
A CSS Clip Path Generator is a tool that helps you create clipping shapes visually and generate the corresponding CSS code. It can simplify the process of building triangles, circles, polygons, and other custom shapes without manually writing every coordinate.
What does the CSS clip-path property do?
The clip-path property defines which parts of an element remain visible. It can clip an image, container, or other HTML element into shapes such as a circle, ellipse, polygon, or inset rectangle.
How do I create a triangle using CSS clip-path?
You can use polygon() with three coordinate points. For example, clip-path: polygon(50% 0%, 100% 100%, 0% 100%) creates a triangle with a top-center point and two bottom corners.
Which CSS clip-path shapes are supported?
Common basic shapes include polygon(), circle(), ellipse(), and inset(). Polygon coordinates can be used to create many custom shapes, including triangles, diamonds, hexagons, arrows, and stars.
Can I use CSS clip-path on images?
Yes. You can apply clip-path to an image element or an HTML container displaying an image. It changes the visible portion of the element without requiring you to create a separate image file for each shape.
Is CSS clip-path responsive?
Clip-path can work well in responsive layouts, particularly when percentage-based coordinates are used. However, the visual appearance may change with the element's aspect ratio, so test your shape at different screen sizes.
Does CSS clip-path change the layout?
No. Clip-path changes the visible region of an element but does not change its original layout box. The element still occupies the space assigned to it by the layout.
What is the difference between clip-path and border-radius?
Border-radius rounds an element's corners, while clip-path can create a wide variety of clipping shapes, including polygons, circles, ellipses, and inset rectangles. Use border-radius for simple rounded corners and clip-path for custom outlines.
Can CSS clip-path create a hexagon?
Yes. You can use polygon() with six coordinate points to define a hexagonal clipping region. Applying the generated CSS to an image or container creates a six-sided visible shape.
Can I use clip-path on buttons and cards?
Yes. Clip-path can create geometric buttons, angled cards, arrow shapes, ribbons, and other distinctive interface elements. Make sure the visible clipping region preserves important text and interaction areas.
Does clip-path support rounded corners?
The inset() function supports an optional round component for rounded rectangular clipping. For ordinary rounded element corners, border-radius may be a simpler choice.
Is CSS clip-path supported by modern browsers?
Modern versions of Chrome, Firefox, Safari, and Edge support commonly used clip-path features. Older browsers may have limitations, so test your implementation in the browsers and versions relevant to your audience.
Do I need SVG to create custom clipping shapes?
No. Many custom geometric shapes can be created directly with CSS polygon(), circle(), ellipse(), and inset(). SVG may be more suitable for intricate artwork or shapes that need more advanced path control.
Can I copy the generated CSS into any website?
The generated CSS can generally be added to a stylesheet or suitable style block in a website that supports the relevant clip-path syntax. You may need to adjust the selector, dimensions, and coordinate values to match your layout.
Is a CSS Clip Path Generator free to use?
An online CSS Clip Path Generator offers a convenient way to prepare clipping shapes in a browser. Check the tool interface for its current usage options and any applicable limitations.