Start a project

Tool 100 of 425 · CSS shapes

CSS Triangle Generator

Writes triangle CSS in both the border and clip-path techniques for any direction.

CSS Triangle Generator

Your input

Result

CSS

    01

    What it does

    Writes triangle CSS in both the border and clip-path techniques for any direction.

    • Up, down, left, right
    • Width, height and colour
    • Border technique and clip-path
    • Tooltip arrow example

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    CSS and a preview, with a Copy and a Download button on every result.

    • CSS triangle
    • Tooltip arrow
    • clip-path

    Why it matters

    Tooltip arrows and dropdown carets are triangles, and the transparent-border trick isn't obvious to write from memory.

    Both techniques are given; clip-path is simpler, borders work in very old browsers.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Generate CSS. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    Border or clip-path?

    clip-path is easier to size and colour. Borders don't clip shadows the same way.

    Can I add a border to the triangle?

    Stack two triangles, or use an SVG.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk