Free CSS Generators: Gradients, Box Shadows, Mesh Gradients and Glassmorphism

Typing box-shadow: 0 20px 60px rgba(...) and refreshing the page twenty times is a slow way to design. Visual CSS generators let you drag a slider, see the result immediately, and copy code that's ready to paste. DoraPDF has four of them, all free and running in your browser:
- CSS Gradient Generator: linear, radial and conic gradients
- Box Shadow Generator: soft, hard, inset and coloured shadows
- Mesh Gradient Generator: blurry, multi-colour backgrounds
- Glassmorphism CSS Generator: frosted-glass cards
Here's what each one does, which settings matter, and a few design habits that keep the results from looking dated.
1. CSS Gradient Generator
What you can control
- Two or three colours. Tick "3 colors" to add a third stop.
- Type: Linear (a straight blend), Radial (a circle spreading from the centre) or Conic (colours sweeping around a point like a colour wheel).
- Angle from 0 to 360 degrees, used by linear and conic gradients.
The output is a single line such as:
css
background: linear-gradient(135deg, #ff2e88, #9b3cff);
Click copy and paste it into your stylesheet, a Tailwind arbitrary value, or a Webflow or WordPress custom CSS field.
Tips for nicer gradients
- Stay close on the colour wheel. Pink to purple or blue to teal blends smoothly. Opposite colours (red to green) tend to pass through a muddy grey in the middle.
- Use the angle to lead the eye. 135° (top-left to bottom-right) feels natural for hero sections because we read in that direction.
- Check text contrast. White text on the lightest part of the gradient must still be readable.
- Conic for charts and badges. Conic gradients are handy for pie-like progress rings and spinning loaders.
2. Box Shadow Generator
The sliders
- Horizontal and Vertical offset (−100 to 100 px): where the shadow falls.
- Blur (0 to 150 px): how soft the edge is.
- Spread (−50 to 50 px): grows or shrinks the shadow before blurring.
- Color and Opacity, combined into an
rgba()value. - Inset: puts the shadow inside the element, for pressed buttons or input fields.
Shadow recipes that work
- Soft card shadow: small vertical offset, large blur, low opacity (around 10 to 20%). Feels modern and light.
- Floating element: larger vertical offset (20 to 30 px), big blur, slightly negative spread so the shadow is narrower than the card.
- Coloured glow: zero offsets, large blur, the same colour as the button at 40 to 50% opacity. Great for call-to-action buttons on dark themes.
- Pressed state: turn on Inset with a small blur.
A common mistake is pure black shadows at high opacity. Real shadows are soft and slightly tinted, so try a dark version of your background colour instead of #000.
3. Mesh Gradient Generator
Mesh gradients are the soft, colourful "blob" backgrounds you see on landing pages and app splash screens. This generator builds them from several overlapping radial gradients, so they're pure CSS, with no image file needed.
How it works
- Click Generate. The tool picks one of its colour palettes and places four colour spots at random positions and sizes.
- Keep clicking until you like the composition. Each click is a new arrangement.
- Copy the CSS (a
background-colorplus a stackedbackground-imageof radial gradients), or click Download PNG for a 1600 × 1000 image to use in slides, social posts or as a wallpaper.
Where mesh gradients shine
- Hero sections behind a headline
- Blog and YouTube thumbnails
- Backgrounds for glassmorphism cards (see below)
Keep text on top short and bold; busy colour behind long paragraphs is tiring to read.
4. Glassmorphism CSS Generator
Glassmorphism is the frosted-glass look: a semi-transparent card that blurs whatever is behind it. The generator shows your card over a colourful background so you can judge the effect properly.
Controls
- Blur (0 to 40 px): the strength of the frosted effect, via
backdrop-filter. - Transparency (0 to 60%): how much of the tint colour fills the card.
- Border (0 to 60%): opacity of a thin 1 px border that catches the light.
- Tint: usually white, but a coloured tint can match your brand.
The code includes both backdrop-filter and -webkit-backdrop-filter, so the effect also works in Safari, plus a 24 px border radius.
Making glass look good
- It needs something behind it. On a flat, single-colour background, glass looks like a grey box. Pair it with a mesh gradient, a photo or shapes.
- Keep transparency low (10 to 20%) and blur moderate (10 to 20 px) for readability.
- Add the border. That faint edge is what sells the "glass" illusion.
- Test performance on phones. Many large blurred layers can make scrolling sluggish on older devices. Use glass for a few key elements, not every card.
A quick workflow that combines all four
- Generate a mesh gradient for the page background.
- Place a glass card on top for your signup form or pricing box.
- Give the main button a linear gradient in your brand colours.
- Add a soft coloured box-shadow under the button so it lifts off the glass.
Privacy
All four generators run entirely in your browser. Nothing is sent to a server, and there's no sign-up.
FAQ
Can I use the generated CSS in commercial projects? Yes. The code is standard CSS that you create with the tool; use it anywhere.
Does glassmorphism work in all browsers?
backdrop-filter is supported in current versions of Chrome, Edge, Safari and Firefox. Older browsers will show the semi-transparent tint without the blur, so keep text readable either way.
How do I use these gradients in Tailwind CSS?
Paste the value into an arbitrary property, for example bg-[linear-gradient(135deg,#ff2e88,#9b3cff)], or add it to your theme as a custom background image.
Can I get a mesh gradient as an image instead of CSS? Yes. Use the Download PNG button in the Mesh Gradient Generator.
Try the tools from this guide — free
Keep reading
Modern CSS Gradients, Shadows and Glass Effects: 10 Recipes You Can Copy
Ten modern CSS recipes: layered box shadows, gradient text, conic gradients, glassmorphism cards and mesh backgrounds. Build each visually, then copy the code.
GuideColor Palette Generator: Create Matching Color Schemes and Copy the Hex Codes
Generate five-color palettes with one key press, lock the colors you like, shuffle the rest and copy the hex codes for your brand, website or slides.
GuideHow to Get a HEX Color Code From an Image (Free Online Color Picker)
Click any pixel in a photo, logo or screenshot to get its HEX, RGB and HSL code. Plus an instant palette of the image's main colours. Free, private.