Skip to content

CSS Triangle Generator

Generate pure CSS triangles and arrows with customizable size, direction, and color. Free CSS triangle code generator with live preview.

CSS ToolsGenerators
Instant results
10px300px
10px300px
100px wide x 80px tall, pointing up

Generated CSS

.triangle {
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 80px solid #f59e0b;
}

HTML

<div class="triangle"></div>

How CSS Triangles Work

CSS triangles are created using the border trick. When an element has zero width and height, its borders form triangles at each edge. By making the opposite border solid and the adjacent borders transparent, you get a triangle pointing in the desired direction. This technique is widely supported and requires no images or SVG.

Size Presets

How to Use CSS Triangle Generator

1

Open CSS Triangle Generator

Navigate to CSS Triangle Generator in your browser — no installation or sign-up required.

2

Enter your data

Type, paste, or upload the content you want to process into the input area.

3

Configure options

Adjust any available settings to customize the output to your needs.

4

Get your result

The result appears instantly. Copy it to your clipboard or download it as a file.

Frequently Asked Questions

CSS Triangle Generator is a free online CSS utilities tool. Generate pure CSS triangles and arrows with customizable size, direction, and color. Free CSS triangle code generator with live preview.