Skip to content
Direction and size → CSSDeveloper tools

CSS Triangle Generator

Create pure CSS triangles pointing in 8 directions, equilateral or custom size, using borders or clip-path, and ready-made tooltip arrows.

Did this tool work for you?

Used CSS Triangle Generator? Share how it went to help others.

About this tool

About CSS Triangle Generator

CSS Triangle Generator makes triangles and arrows with CSS alone, without images or SVG. Choose one of eight directions: up, down, left, right, or one of the four corners for right-angled triangles. Set the width and height with sliders, or keep Equilateral on so all three sides are equal: the tool then calculates the height from the base using the √3 ÷ 2 ratio, so an 80-pixel base gives a 69-pixel height. Pick a colour and a method. The border method is the classic trick: an element with no width or height gets thick borders, one of them coloured and its neighbours transparent, and the coloured border appears as a triangle. It works in every browser ever made. The clip-path method draws a normal box and cuts it into a triangle with polygon(), so the triangle can use gradients, images, hover effects and transitions, and its size is simply its width and height. For speech bubbles and tooltips, tick “As a tooltip arrow”: the tool writes a .tooltip rule and a ::after pseudo-element with content, absolute positioning and the right offsets, so the arrow sits on the edge of the box and points away from it. The preview shows the triangle or the tooltip exactly as the CSS will draw it, and the code can be copied in one click. Everything runs in your browser.

CSS Triangle Generator tool

Where triangles appear

Small shapes, big polish

Tooltips and bubbles

An arrow pointing at what the tip describes.

ExampleA downward arrow under a “Copied!” tooltip.

Dropdown menus

Small carets beside menu labels.

ExampleA 10px down triangle next to “Tools”.

Section dividers

Corner triangles for angled section edges.

ExampleA bottom-right triangle across the width of a banner.

Ribbons and badges

Notches on labels and corner ribbons.

ExampleA top-left triangle with “NEW” on a product card.

Triangle tips

Choose the right method

Borders for simple arrows

Tiny, solid-colour arrows work best with borders.

clip-path for effects

Gradients and hover transitions need clip-path.

Match the bubble colour

The arrow must be the same colour as its tooltip.

Round the bubble

Give tooltips soft corners.

Border Radius Generator
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed CSS Triangle Generator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 24 November 2026

Answers and guidanceFrequently Asked Questions
How does the CSS border triangle work?
An element with zero width and height shows only its borders, which meet at diagonal lines. Making one border coloured and the two beside it transparent leaves a triangle.
Border or clip-path: which is better?
Borders work everywhere and suit small solid arrows. clip-path supports gradients, images and animations, and its size is easier to control.
How is the equilateral height calculated?
Height = base × √3 ÷ 2, about 0.866 times the base.
How do I add an arrow to a tooltip?
Tick the tooltip option. It adds position: relative to the box and positions a ::after triangle on the chosen edge.
Can the triangle have a border outline?
Not directly. Stack two triangles (::before slightly larger in the outline colour, ::after on top), or use an SVG.
Does it work on mobile?
Yes. Both methods work in all current mobile browsers.
Why can I see a gap between my tooltip and its arrow?
Fractional sizes can leave a hairline gap at some zoom levels. Use whole, even pixel sizes, or move the arrow one pixel towards the box.
Will a screen reader announce the arrow?
No. An empty pseudo-element is decorative and has nothing to read. Make sure the tooltip text itself is available to people using a keyboard or screen reader.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.