Drag color points into place, turn on animation, and copy the SVG code. You can also copy CSS, add grain, or save PNG, WebP, or SVG files sized for wallpapers and social posts.
1200 × 800px · Default 3:2 · Drag the points to arrange colors
Color Layers3/8
Presets
Output Size (Wallpaper & Social)
Global Settings
Export
Copy CSS stacks radial-gradient layers, so it only approximates the preview and has no animation. Grain is added as a background image. Copy SVG as CSS embeds the SVG itself. PNG and WebP are saved as still images.
Make an animated mesh gradient SVG and paste it into HTML
Place 2 to 8 color points on the canvas, check Animation (SVG only), and click Copy SVG to get inline SVG code for an animated mesh gradient. Each color is a blurred circle blended with the others, and the motion comes from SVG <animate> elements, so the code needs no JavaScript or CSS animation.
The same layout can also be exported with Copy CSS (stacked radial-gradient layers), Copy SVG as CSS (the SVG as a background-image data URI), or Save PNG, Save WebP, and Save SVG files. Grain, a per-layer Lock, and 8 presets are built in.
Mesh gradient backgrounds for hero sections, wallpapers, and social posts
Website hero background
Paste the inline SVG into a hero section as a layer behind your headline, or use Copy CSS for a still background on a card or section. The SVG is set to 100% width and height with preserveAspectRatio="xMidYMid slice", so it crops to fill its parent instead of stretching.
Phone and desktop wallpaper
Choose Phone Wallpaper 9:16 (1080×1920) or Desktop Wallpaper 16:9 (1920×1080), pick PNG / WebP 2x, and click Save PNG. A 2x desktop wallpaper is 3840×2160. Add a little Grain for a subtler texture.
Social posts, thumbnails, and link previews
Pick Instagram Post 1:1 (1080×1080), YouTube Thumbnail (1280×720), Open Graph Image (1200×630), X Header 3:1 (1500×500), or LinkedIn Banner 4:1 (1584×396), then save a PNG or WebP. Soft color areas make a quiet backdrop for a headline.
Slides and design files
Save a PNG to drop into Keynote, PowerPoint, or Google Slides. Save SVG keeps the gradient as vector data for editing in apps like Figma or Illustrator, though some apps draw the blur filter differently.
Drag colors, set grain and motion, then copy or save
- Click a preset under Presets, or press Shuffle Colors, to start from a palette.
- Click Lock on any layer you want to keep. Locked layers keep their color and position when you press Shuffle Colors or Shuffle Positions.
- Under Output Size (Wallpaper & Social), choose a size such as Desktop Wallpaper 16:9, or type Width (px) and Height (px).
- Drag the points on the preview, or use X Position, Y Position, and Size on each layer, to place the colors.
- Adjust Blur and Grain, then check Animation (SVG only) and set Animation Speed.
- Under Export, click Copy SVG, Copy CSS, or Copy SVG as CSS for code. Choose PNG / WebP 1x or 2x, then click Save PNG, Save WebP, or Save SVG for files.
Note: Shuffle Positions moves every unlocked layer to a new random spot and keeps the colors. Press it as many times as you like to find a layout you want.
What each export includes: SVG, CSS, PNG, and WebP
- Copy SVG: inline SVG with width and height set to 100% and preserveAspectRatio="xMidYMid slice". It fills its parent element and crops, rather than stretching, when the aspect ratio changes. Each copy uses a different random ID for its filters, so several can sit on one page.
- Copy CSS: a .mesh-gradient class with a background-color (the Base color) and one radial-gradient per other layer. It approximates the SVG blur, so it can look slightly different from the preview. It has no animation. If Grain is above 0, the grain is added as an SVG data URI background image.
- Copy SVG as CSS: the same SVG inside a background-image data URI, with background-size: cover and background-position: center. The animation and grain settings are part of the SVG code.
- Animation Speed runs from 1 to 5, with 3 as the default. A higher number is faster. At speed 3, each layer's loop lasts about 10 to 26 seconds, and every layer uses a slightly different length.
- Save PNG and Save WebP use the selected output size. PNG / WebP 2x doubles width and height (1920×1080 becomes 3840×2160). Both are still images, so the animation is not included.
- If your browser cannot export WebP, nothing is saved and the tool tells you to use Save PNG. Very large images (for example 4000×4000 at 2x) can exceed what some browsers allow, so try 1x if a save fails.
SVG vs CSS vs PNG vs WebP for gradient backgrounds
Pick the export by where the gradient will be used.
| Export | Use it for | Animation | Notes |
|---|---|---|---|
| Copy SVG | Hero backgrounds pasted into HTML | Included if Animation is on | Same SVG as the preview. Fills its parent element |
| Copy CSS | Cards, buttons, and section backgrounds | Not included | Approximation with radial-gradient layers |
| Copy SVG as CSS | A background-image rule with no separate file | Included if Animation is on | SVG stored as a data URI in the stylesheet |
| Save PNG (1x / 2x) | Wallpapers, slides, and social posts | Not included (still image) | Opens in any app. Large if used on a web page |
| Save WebP (1x / 2x) | Website background images | Not included (still image) | Your browser must support WebP export |
| Save SVG | Editing in Figma or Illustrator | Included if Animation is on | Fixed width and height. Blur may look different in other apps |
Page weight: inline SVG and CSS gradients are part of the page code, so they add no image request. A PNG used as a web background adds one, and WebP usually gives a smaller file than PNG for the same image.
Text over a gradient: try a high Blur, Grain between 10 and 20, and slightly muted colors. Softer color changes behind a headline make the text easier to read.
Grainy gradient background and mesh gradient CSS tips
Settings to try when you move a mesh gradient into a stylesheet, a wallpaper, or a dark UI.
Mesh gradient CSS: add it to a section or card
Click Copy CSS, paste the .mesh-gradient rule into your stylesheet, and add the class to any element. Each layer is a radial-gradient sized as a percentage of the element, so it stretches with the box. Set Width (px) and Height (px) close to the element's shape before you copy for a closer match to the preview.
Mesh gradient SVG as a CSS background-image
Click Copy SVG as CSS to get a rule where background-image holds the SVG as a data URI, followed by background-size: cover and background-position: center. Use it when you want the SVG look, the grain, and the animation setting inside a stylesheet instead of in the HTML. The Width and Height you set become the SVG's own size.
Grainy gradient background: grain settings
Raise Grain above 0 to show Grain Fineness and Grain Blend Mode. Start with Overlay and a Grain value of 10 to 20. If the grain looks too harsh against the colors, switch to Soft Light. Grain Fineness runs from 2 to 10, and higher values make smaller grains.
Mesh gradient wallpaper for phone and desktop
Choose Phone Wallpaper 9:16 or Desktop Wallpaper 16:9 and set PNG / WebP 2x. On a phone, the clock sits near the top and the dock near the bottom, so put your calmest colors behind those areas and keep the strongest color changes toward the middle.
Dark mode glow background
Pick the Neon Night preset so the Base color is dark, then lower Size on each layer and move the points toward the edges. The result looks like colored light glowing from the sides. Adding mix-blend-mode: screen to the element in your own CSS can help it blend with what is behind it.
Brand colors: hex codes and Lock
Type your hex codes (#RGB or #RRGGBB) into the hex code box on each layer. Click Lock on the brand-color layers, then press Shuffle Colors to explore other colors around them.
Reduced motion: offer a still version
SVG <animate> elements do not switch off by themselves when a visitor asks for reduced motion. To respect that setting, use the Copy CSS output as a still background and show it inside @media (prefers-reduced-motion: reduce) while hiding the animated SVG.
Muddy colors, CSS that looks different, animation that won't play
The pasted CSS doesn't match the preview
The blur or color spread in your page looks different from the preview. The preview is the SVG, and Copy CSS rebuilds it from radial-gradient layers, which is an approximation.
💡 See the solution▼
Colors turn muddy gray or brown where they meet
Opposite colors such as red and green, or blue and yellow, can mix into a dull gray or brown when two layers sit close together.
💡 See the solution▼
The saved PNG or WebP doesn't move
You saved an image and expected the animation. PNG and WebP are saved as still images, and Copy CSS has no animation either.
💡 See the solution▼
The SVG moves in the preview but not where I pasted it
Design apps, slide apps, and some email clients may show an animated SVG as a still image, or not at all.
💡 See the solution▼
Text on the gradient is hard to read
A hero section with a gradient behind it can leave the text without enough contrast, especially where bright colors sit behind it.
💡 See the solution▼
Mesh gradient generator questions: CSS, grain, wallpaper size
Q.How do I make a mesh gradient animation in SVG?
A. Place the color points, check Animation (SVG only), and click Copy SVG. Paste the code into your HTML. Each layer drifts up to about 6% of the canvas and back using SVG <animate> elements, so no JavaScript or CSS animation is needed. Animation Speed (1 to 5, default 3) sets how long each loop takes.
Q.How do I make a mesh gradient in CSS?
A. CSS has no mesh gradient property, so this tool stacks radial-gradient layers instead. Place the points, click Copy CSS, and add the .mesh-gradient class to an element. The result approximates the SVG preview and does not animate. Before you copy, set Width (px) and Height (px) close to the element's proportions to get a closer match.
Q.Can I use the SVG as a CSS background-image?
A. Yes. Click Copy SVG as CSS to get a .mesh-gradient rule that holds the SVG as a data URI in background-image, with background-size: cover and background-position: center. The code includes the animation if Animation (SVG only) is checked, and the grain if Grain is above 0.
Q.How do I add grain or noise to a mesh gradient?
A. Raise the Grain slider above 0 (range 0 to 40). Grain Fineness and Grain Blend Mode (Overlay, Soft Light, Luminosity) then appear. A higher Grain Fineness value makes smaller grains. Grain is included in Copy SVG, Copy CSS, Copy SVG as CSS, Save PNG, Save WebP, and Save SVG.
Q.What size should a mesh gradient wallpaper be?
A. Use Desktop Wallpaper 16:9 (1920×1080) for monitors and Phone Wallpaper 9:16 (1080×1920) for phones, then choose PNG / WebP 2x for a sharper file (3840×2160 or 2160×3840). Many newer phones are taller than 9:16, so enter your phone's screen resolution in Width (px) and Height (px) for a closer fit. Each side can be 100 to 4000 px.
Q.Can I keep some colors and shuffle the rest?
A. Yes. Click Lock on a layer and the button changes to Locked. Shuffle Colors and Shuffle Positions skip locked layers, so you can keep the colors you like and re-roll the others. Click Locked to unlock the layer.
Q.Can I make a mesh gradient with only two colors?
A. Yes. A gradient here needs at least 2 colors and can have up to 8. The first color (Base) also fills the background, and every layer is a blurred circle on top of it. Use Add Color Layer to add a color, or the trash button on a layer to remove one.
Q.Can I use the gradients in commercial projects?
A. Yes. You can use the exported SVG, CSS, PNG, and WebP in personal or commercial work, including websites, apps, print, and social posts. The tool needs no account or sign-in.
Your feedback
makes this tool better.
Tell us which features you'd like, what should be fixed, or which new tool you'd like to see. An engineer reads every submission and uses it to guide development.