CODDY Tool

CSS Generator

Build CSS gradients, box shadows, text shadows and border radii visually.

Design a gradient, shadow or rounded corner with sliders and a live preview, then copy the CSS. Covers linear, radial and conic gradients, layered box shadows, text shadows and independent corner radii.

Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.

Loading tool…

What CSS Generator supports

  • GradientLinear, radial and conic.
  • Box shadowLayered, with inset.
  • Text shadowGlow and emboss effects.
  • Border radiusPer-corner control.

About CSS Generator

Gradients, shadows and radii are all easier to design by eye than to write by hand. A box shadow has five numbers and a colour, and the difference between one that looks like a real object and one that looks like a smudge is a matter of adjusting all six together while watching the result.

Everything here produces plain CSS with no dependencies and no vendor prefixes — all four features have been supported without prefixes in every current browser for years. The output is the code you paste, not a class name that requires a library.

The colour inputs share the same engine as the rest of the colour tools, so you can paste any format and use the picker interchangeably.

How to generate CSS

  1. Choose what you are building

    Gradient, box shadow, text shadow or border radius. Each has its own controls and preview.

  2. Adjust until it looks right

    Drag the sliders and pick colours. The preview updates live, so you are designing rather than guessing at numbers.

  3. Copy the CSS

    The generated rule appears below the preview, formatted and ready to paste.

Making shadows look real

  • Use two or three layered shadows rather than one. Real objects cast a tight, dark shadow close to the edge and a wide, faint one further out; a single shadow cannot do both.
  • Keep the blur larger than the vertical offset. A large offset with little blur reads as a hard, artificial drop.
  • Never use pure black. A dark, slightly saturated version of the background hue looks far more natural than rgba(0,0,0,0.5).
  • Push everything in one direction. Light comes from above in almost every interface, so shadows fall downward — a shadow offset upward looks immediately wrong.
  • Bigger elevation means larger blur and larger offset together. A modal should cast a much softer, wider shadow than a button.

Gradient banding

Long, subtle gradients often show visible stripes. The cause is the eight bits per channel available on most displays: across a large area, adjacent steps become wide enough to see as bands.

The practical fixes are to add intermediate colour stops so the interpolation has more to work with, to increase the difference between the start and end colours, or to overlay a very faint noise texture, which breaks up the boundaries. A gradient between two colours of similar lightness bands the worst.

Frequently asked questions

Do I need vendor prefixes for any of this?

No. Gradients, box shadows, text shadows and border radius have all been supported unprefixed in every browser in current use for many years. Prefixed versions in tutorials are leftovers from around 2012 and only make your CSS longer.

What is a conic gradient useful for?

It sweeps colour around a centre point rather than along a line, which makes it the simplest way to draw a pie chart, a progress ring or a colour wheel in pure CSS. Combined with a mask it produces circular progress indicators with no SVG at all.

Why does my box shadow get clipped?

Something in an ancestor has overflow set to hidden. A box shadow is painted outside the element's border box, so any clipping container cuts it off. Move the shadow to an element outside the clip, or replace the clipping with a border radius on the element itself.

Should I use box-shadow or filter: drop-shadow?

Box shadow follows the element's rectangle and border radius, which is what you want for cards and buttons. Drop shadow follows the actual alpha shape, so it is what you need for a transparent PNG, an icon or an irregular clipped shape. Drop shadow costs more to render.

CSS Generator is free to use with no account, no watermark and no usage limits. Last updated 14 August 2026.