# hexagon icon

Hexagon. Gentleface icon, drawn on the 16 px pixel grid. Free, MIT licensed. Page: https://gentleface.com/icons/hexagon

- Category: Shapes
- Use it for: hexagon
- Tags: hexagon, shape, polygon, six-sided, honeycomb, cell, geometry
- Component name: HexagonIcon
- Added: 2026-10-14

## Files

Each SVG is 16 × 16 with fill="currentColor". Keep it at 16 px or an exact multiple (32, 48) on whole pixels: a fractional size or position blurs it.

- line-round: https://gentleface.com/svg/line-round/16/hexagon.svg · PNG https://gentleface.com/png/line-round/16/hexagon.png · https://gentleface.com/png/line-round/32/hexagon.png · https://gentleface.com/png/line-round/48/hexagon.png
- line-soft: https://gentleface.com/svg/line-soft/16/hexagon.svg · PNG https://gentleface.com/png/line-soft/16/hexagon.png · https://gentleface.com/png/line-soft/32/hexagon.png · https://gentleface.com/png/line-soft/48/hexagon.png
- line-sharp: https://gentleface.com/svg/line-sharp/16/hexagon.svg · PNG https://gentleface.com/png/line-sharp/16/hexagon.png · https://gentleface.com/png/line-sharp/32/hexagon.png · https://gentleface.com/png/line-sharp/48/hexagon.png
- solid-round: https://gentleface.com/svg/solid-round/16/hexagon.svg · PNG https://gentleface.com/png/solid-round/16/hexagon.png · https://gentleface.com/png/solid-round/32/hexagon.png · https://gentleface.com/png/solid-round/48/hexagon.png
- solid-soft: https://gentleface.com/svg/solid-soft/16/hexagon.svg · PNG https://gentleface.com/png/solid-soft/16/hexagon.png · https://gentleface.com/png/solid-soft/32/hexagon.png · https://gentleface.com/png/solid-soft/48/hexagon.png
- solid-sharp: https://gentleface.com/svg/solid-sharp/16/hexagon.svg · PNG https://gentleface.com/png/solid-sharp/16/hexagon.png · https://gentleface.com/png/solid-sharp/32/hexagon.png · https://gentleface.com/png/solid-sharp/48/hexagon.png

The SVG of every style: https://gentleface.com/icons/hexagon.json (`svg`).

## Code (line-round)

The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. For another style, take its SVG from the JSON and swap the path `d`.

### SVG

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z"/></svg>
```

### React

```tsx
// Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon
import type { SVGProps } from 'react';

export function HexagonIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon -->
<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
    <path d="M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon -->
<script>
  let props = $props();
</script>

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
  <path d="M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z" />
</svg>
```

### HTML img

```html
<!-- Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon. An <img> can't take currentColor: it draws black. Inline the SVG or use the CSS mask to color it. -->
<img src="https://gentleface.com/svg/line-round/16/hexagon.svg" width="16" height="16" alt="">
```

### CSS

```css
/* Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon. Takes the text color. */
.icon-hexagon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
```

### Data URL

```text
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z'/%3E%3C/svg%3E
```

### Sprite

```html
<!-- Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon
     Every icon of this style in one file: https://gentleface.com/sprite/line-round.svg
     Serve it from your own origin: <use> does not load from another origin. -->
<svg width="16" height="16" aria-hidden="true"><use href="/sprite/line-round.svg#hexagon"/></svg>
```

### SwiftUI

```swift
// Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon
import SwiftUI

struct HexagonIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 13.851, y: 11.717))
        p.addCurve(to: CGPoint(x: 13.447, y: 12.085), control1: CGPoint(x: 13.751, y: 11.878), control2: CGPoint(x: 13.617, y: 12.001))
        p.addLine(to: CGPoint(x: 8.618, y: 14.5))
        p.addCurve(to: CGPoint(x: 7.5, y: 14.764), control1: CGPoint(x: 8.266, y: 14.676), control2: CGPoint(x: 7.893, y: 14.764))
        p.addCurve(to: CGPoint(x: 6.382, y: 14.5), control1: CGPoint(x: 7.107, y: 14.764), control2: CGPoint(x: 6.734, y: 14.676))
        p.addLine(to: CGPoint(x: 1.553, y: 12.085))
        p.addCurve(to: CGPoint(x: 1.149, y: 11.717), control1: CGPoint(x: 1.383, y: 12.001), control2: CGPoint(x: 1.249, y: 11.878))
        p.addCurve(to: CGPoint(x: 1, y: 11.191), control1: CGPoint(x: 1.05, y: 11.556), control2: CGPoint(x: 1, y: 11.38))
        p.addLine(to: CGPoint(x: 1, y: 4.809))
        p.addCurve(to: CGPoint(x: 1.149, y: 4.283), control1: CGPoint(x: 1, y: 4.62), control2: CGPoint(x: 1.05, y: 4.444))
        p.addCurve(to: CGPoint(x: 1.553, y: 3.915), control1: CGPoint(x: 1.249, y: 4.122), control2: CGPoint(x: 1.383, y: 3.999))
        p.addLine(to: CGPoint(x: 6.382, y: 1.5))
        p.addCurve(to: CGPoint(x: 7.5, y: 1.236), control1: CGPoint(x: 6.734, y: 1.324), control2: CGPoint(x: 7.107, y: 1.236))
        p.addCurve(to: CGPoint(x: 8.618, y: 1.5), control1: CGPoint(x: 7.893, y: 1.236), control2: CGPoint(x: 8.266, y: 1.324))
        p.addLine(to: CGPoint(x: 13.447, y: 3.915))
        p.addCurve(to: CGPoint(x: 13.851, y: 4.283), control1: CGPoint(x: 13.617, y: 3.999), control2: CGPoint(x: 13.751, y: 4.122))
        p.addCurve(to: CGPoint(x: 14, y: 4.809), control1: CGPoint(x: 13.95, y: 4.444), control2: CGPoint(x: 14, y: 4.62))
        p.addLine(to: CGPoint(x: 14, y: 11.191))
        p.addCurve(to: CGPoint(x: 13.851, y: 11.717), control1: CGPoint(x: 14, y: 11.38), control2: CGPoint(x: 13.95, y: 11.556))
        p.closeSubpath()
        p.move(to: CGPoint(x: 2, y: 4.809))
        p.addLine(to: CGPoint(x: 2, y: 11.191))
        p.addLine(to: CGPoint(x: 6.829, y: 13.606))
        p.addCurve(to: CGPoint(x: 7.5, y: 13.764), control1: CGPoint(x: 7.04, y: 13.711), control2: CGPoint(x: 7.264, y: 13.764))
        p.addCurve(to: CGPoint(x: 8.171, y: 13.606), control1: CGPoint(x: 7.736, y: 13.764), control2: CGPoint(x: 7.96, y: 13.711))
        p.addLine(to: CGPoint(x: 13, y: 11.191))
        p.addLine(to: CGPoint(x: 13, y: 4.809))
        p.addLine(to: CGPoint(x: 8.171, y: 2.394))
        p.addCurve(to: CGPoint(x: 7.5, y: 2.236), control1: CGPoint(x: 7.96, y: 2.289), control2: CGPoint(x: 7.736, y: 2.236))
        p.addCurve(to: CGPoint(x: 6.829, y: 2.394), control1: CGPoint(x: 7.264, y: 2.236), control2: CGPoint(x: 7.04, y: 2.289))
        p.addLine(to: CGPoint(x: 2, y: 4.809))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

// HexagonIcon().frame(width: 16, height: 16) fills with the foreground style. Keep it on whole points to stay crisp.
```

### Compose

```kotlin
// Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.addPathNodes
import androidx.compose.ui.unit.dp

val HexagonIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "hexagon", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

// Icon(HexagonIcon, contentDescription = null) tints it with LocalContentColor.
```

### Android XML

```xml
<!-- res/drawable/ic_hexagon.xml · Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="16dp"
    android:height="16dp"
    android:viewportWidth="16"
    android:viewportHeight="16"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M13.851 11.717C13.751 11.878 13.617 12.001 13.447 12.085L8.618 14.5C8.266 14.676 7.893 14.764 7.5 14.764C7.107 14.764 6.734 14.676 6.382 14.5L1.553 12.085C1.383 12.001 1.249 11.878 1.149 11.717C1.05 11.556 1 11.38 1 11.191L1 4.809C1 4.62 1.05 4.444 1.149 4.283C1.249 4.122 1.383 3.999 1.553 3.915L6.382 1.5C6.734 1.324 7.107 1.236 7.5 1.236C7.893 1.236 8.266 1.324 8.618 1.5L13.447 3.915C13.617 3.999 13.751 4.122 13.851 4.283C13.95 4.444 14 4.62 14 4.809L14 11.191C14 11.38 13.95 11.556 13.851 11.717ZM2 4.809L2 11.191L6.829 13.606C7.04 13.711 7.264 13.764 7.5 13.764C7.736 13.764 7.96 13.711 8.171 13.606L13 11.191L13 4.809L8.171 2.394C7.96 2.289 7.736 2.236 7.5 2.236C7.264 2.236 7.04 2.289 6.829 2.394L2 4.809Z"/>
</vector>
```

### Flutter

```dart
// Gentleface "hexagon" (line-round), MIT. https://gentleface.com/icons/hexagon
import 'package:flutter/widgets.dart';

class HexagonIcon extends StatelessWidget {
  const HexagonIcon({super.key, this.size = 16, this.color});
  final double size;
  final Color? color;

  @override
  Widget build(BuildContext context) => CustomPaint(
        size: Size.square(size),
        painter: _HexagonIconPainter(color ?? IconTheme.of(context).color ?? const Color(0xFF000000)),
      );
}

class _HexagonIconPainter extends CustomPainter {
  _HexagonIconPainter(this.color);
  final Color color;

  @override
  void paint(Canvas canvas, Size size) {
    canvas.scale(size.width / 16, size.height / 16);
    final p = Path()
      ..moveTo(13.851, 11.717)
      ..cubicTo(13.751, 11.878, 13.617, 12.001, 13.447, 12.085)
      ..lineTo(8.618, 14.5)
      ..cubicTo(8.266, 14.676, 7.893, 14.764, 7.5, 14.764)
      ..cubicTo(7.107, 14.764, 6.734, 14.676, 6.382, 14.5)
      ..lineTo(1.553, 12.085)
      ..cubicTo(1.383, 12.001, 1.249, 11.878, 1.149, 11.717)
      ..cubicTo(1.05, 11.556, 1, 11.38, 1, 11.191)
      ..lineTo(1, 4.809)
      ..cubicTo(1, 4.62, 1.05, 4.444, 1.149, 4.283)
      ..cubicTo(1.249, 4.122, 1.383, 3.999, 1.553, 3.915)
      ..lineTo(6.382, 1.5)
      ..cubicTo(6.734, 1.324, 7.107, 1.236, 7.5, 1.236)
      ..cubicTo(7.893, 1.236, 8.266, 1.324, 8.618, 1.5)
      ..lineTo(13.447, 3.915)
      ..cubicTo(13.617, 3.999, 13.751, 4.122, 13.851, 4.283)
      ..cubicTo(13.95, 4.444, 14, 4.62, 14, 4.809)
      ..lineTo(14, 11.191)
      ..cubicTo(14, 11.38, 13.95, 11.556, 13.851, 11.717)
      ..close()
      ..moveTo(2, 4.809)
      ..lineTo(2, 11.191)
      ..lineTo(6.829, 13.606)
      ..cubicTo(7.04, 13.711, 7.264, 13.764, 7.5, 13.764)
      ..cubicTo(7.736, 13.764, 7.96, 13.711, 8.171, 13.606)
      ..lineTo(13, 11.191)
      ..lineTo(13, 4.809)
      ..lineTo(8.171, 2.394)
      ..cubicTo(7.96, 2.289, 7.736, 2.236, 7.5, 2.236)
      ..cubicTo(7.264, 2.236, 7.04, 2.289, 6.829, 2.394)
      ..lineTo(2, 4.809)
      ..close();
    canvas.drawPath(p, Paint()..color = color);
  }

  @override
  bool shouldRepaint(_HexagonIconPainter old) => old.color != color;
}
```
