CSS Triangle Generator

Build a pure-CSS triangle (the zero-size-box-plus-borders trick) in any direction.

width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 50px solid #6366f1;

Related tools

How it works

  1. 1

    Pick a direction, size and color

    Up, down, left or right.

  2. 2

    See the live preview

    Updates instantly as you adjust.

  3. 3

    Copy the CSS

    No image or SVG needed - pure CSS.

FAQ

How does a CSS triangle actually work?
A zero-size box with transparent borders on two sides and a solid-color border on the third - the visible border edge renders as a triangle.
Does this tool send my input anywhere?
No - the CSS is generated entirely in your browser.

Tool4U.net — every tool runs in your browser. No file ever leaves your device unless the tool says so.

© 2026 Tool4U.net