Design tools

Box Shadow Generator

CSS Box Shadow Generator

Layered CSS box shadows with inset, presets and a live preview.

About this tool

About Box Shadow Generator

Realistic shadows are rarely a single layer. This generator lets you stack up to eight box-shadow layers, each with its own horizontal and vertical offset, blur, spread, colour, opacity and inset switch, and shows the result on a card as you drag. Start from a preset such as Subtle, Soft, Elevated (five stacked layers for a smooth, natural fall-off), Floating, Hard offset, Inner, Glow or Ring, then fine-tune it. Change the card colour, page background and corner radius to check the shadow in context, because the same shadow looks very different on white and on a tinted background. The output is a single box-shadow declaration with rgba colours, plus a ready-made Tailwind CSS arbitrary class, so you can paste it into a stylesheet, a component or a design token. Duplicate a layer to build variations quickly, or remove layers you don't need. Everything is calculated in your browser, with no sign-up and nothing uploaded. A template gallery of 24 shadows covers a full elevation scale, coloured glows, focus rings, inset states and dark-mode depth. Optional AI assist can turn a description like "soft floating card" into layers, using your own AI key.

Built and maintained by Abhi JainUpdated

How to Make a CSS Box Shadow

  1. 1

    Pick a preset

    Choose a preset such as Soft or Elevated, or keep the default.

  2. 2

    Edit the layers

    Select a layer and adjust its offsets, blur, spread, colour, opacity and Inset setting. Add, duplicate or remove layers.

  3. 3

    Check the preview

    Change the box colour, background and corner radius to see the shadow in context.

  4. 4

    Copy the code

    Copy the CSS or the Tailwind class from the output panel.

Box Shadow Generator: questions and answers

What do the four box-shadow numbers mean?

In order: horizontal offset, vertical offset, blur radius and spread radius, followed by the colour. Positive offsets move the shadow right and down; a negative spread makes the shadow smaller than the element.

How do I make a shadow look more natural?

Stack several layers with increasing offset and blur and low opacity each, for example 1px, 2px, 4px, 8px and 16px at about 8% black. The Elevated preset does exactly this.

Does box-shadow affect layout or performance?

Shadows never change layout or element size. Very large blur values on many elements can slow scrolling on low-end phones, so keep big blurs for a few key elements.

How do I use the shadow in Tailwind CSS?

Copy the Tailwind tab. It uses an arbitrary value, shadow-[…], with spaces replaced by underscores, so it works without editing your Tailwind config.

Can AI help me create a box shadow?

Yes, optionally. Click AI, describe the look (for example a soft floating card or a purple glow), and apply the suggested layers; every value stays editable and is kept within the slider ranges. It uses your own AI key, and only your description and the current layers are sent, straight to your provider.

Which shadow templates are included?

24 templates: a six-step elevation scale (hairline to overlay), natural layered and floating shadows, brand-tinted glows, focus and error rings, pressed insets, hard neo-brutal offsets and dark-mode shadows. Picking one also sets a matching box colour, background and radius.