Bought Pro? It is on your account. Sign in
SVG Creator Go Pro

Moon icon (free SVG)

In shortA crescent moon means night, sleep or dark mode. It is the usual counterpart to the sun in a light/dark theme switch. Download this moon icon free in four styles as a 24×24 SVG that uses currentColor; every file is under 1 KB and free for commercial use.

Style collections: outline · filled · duotone · glyph · Updated 2026-10-21

Moon icon, outline style, on a light backgroundMoon icon, outline style, on a dark background
Outline · 248 bytes
Moon icon, filled style, on a light backgroundMoon icon, filled style, on a dark background
Filled · 256 bytes
Moon icon, duotone style, on a light backgroundMoon icon, duotone style, on a dark background
Duotone · 357 bytes
Moon icon, glyph style, on a light backgroundMoon icon, glyph style, on a dark background
Glyph · 184 bytes

Variations

The same moon drawn four ways. Open any of them in the editor to recolour it, change the stroke, rotate or export PNG.

Moon icon at 16 pixels
16px
Moon icon at 20 pixels
20px
Moon icon at 24 pixels
24px
Moon icon at 32 pixels
32px
Moon icon at 48 pixels
48px

Code

Inline SVG (HTML)

<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z"/></svg>

React component

export default function MoonIcon({ size = 24, color = "currentColor", ...props }) {
  return (
    <svg
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      stroke={color}
      strokeWidth={2}
      strokeLinecap="round"
      strokeLinejoin="round"
      {...props}
    >
      <path d="M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z" />
    </svg>
  );
}

CSS mask (recolour with color)

.icon-moon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z'/%3E%3C/svg%3E") no-repeat center / contain;
}

Image tag

<img src="https://mumshadjawad.com/svg-creator/icons/moon-outline.svg" width="24" height="24" alt="">

Not sure which to use? See SVG icons in React, SVG icons in CSS and how to change an SVG icon's colour.

Details

Good for
dark mode, night, sleep, do not disturb
Grid
24 × 24, viewBox="0 0 24 24", 2px safe area
Outline stroke
2px, round caps and joins
Shapes
1 element (outline, classic)
File sizes
outline 248 B · filled 256 B · duotone 357 B · glyph 184 B
Licence
Free for personal and commercial use, no attribution required
Collections
weather and nature icons, space icons

Related icons

Need a different moon?

Describe it ("moon, minimal, rounded") and get four new variations.
Generate variations