InstantTools.siteZero Latency Utilities
dev Tool
100% In-Memory (Zero Server Upload)

CSS Triangle Generator

Generate border-trick CSS triangles with any direction, size, unit and colour.

Length of the flat edge

Distance to the point

Any CSS colour

Used in the generated rule

Which way the tip faces

Written into the CSS values

Preview

Built with the classic transparent-border trick — the element keeps a 0×0 box, so the borders draw the shape. Point the coloured edge opposite the direction you want the tip to face.
Triangle rendering can shift by a sub-pixel at fractional sizes; if edges look blurry, round the base to an even number so the half-edge lands on whole pixels.

About CSS Triangle Generator

Pick a direction, base and height in px, rem or em, choose a colour and a class name, and the tool produces the classic transparent-border triangle rule with a live preview of the exact shape. Handy for speech-bubble tails, dropdown arrows and decorative accents where you do not want an image file. Everything runs in your browser.

Key Features & Privacy Guarantee

  • Zero server transmission: all computation happens instantly in your local browser runtime.
  • No sign-up, no subscriptions, and no usage quotas.
  • Optimized for maximum speed, accuracy, and lightweight performance.
  • Instant one-click clipboard copying.

Frequently Asked Questions

Common questions and helpful answers about this utility.

The element has a 0×0 box and four borders; when two adjacent borders are transparent and one is coloured, the visible part renders as a triangle.