Skip to main content

CSS Box Shadow Generator

Design CSS box shadows with sliders for offset, blur, spread, and color — copy the CSS

Runs locally in your browser🆓Free — no sign-up🔒100% Private

The CSS box-shadow property adds drop shadows, inner glow effects, and layered shadow stacking to HTML elements — creating the visual depth and elevation that distinguish modern UI components from flat ones. Cards, buttons, modals, tooltips, and input fields all commonly use box shadows. The syntax has six parameters (x-offset, y-offset, blur-radius, spread-radius, colour, inset direction) that interact in non-obvious ways, making trial-and-error in browser dev tools time-consuming. This box shadow generator provides a visual, real-time preview that updates as you adjust each parameter with sliders, and outputs the exact CSS box-shadow declaration ready to paste into your stylesheet. A few typical scenarios illustrate exactly how useful this tool becomes in practice. A front-end developer building a product pricing card wants a subtle ambient shadow that lifts the card off the background without looking harsh — dialling in a large blur radius, zero spread, and a semi-transparent dark colour takes seconds here rather than minutes of reloading the browser. A UI designer prototyping a floating action button needs a stacked multi-layer shadow to mimic Material Design elevation, combining a close sharp shadow for contact and a diffuse outer shadow for atmosphere — the generator makes it straightforward to compose and preview both layers together. A developer styling a search input wants an inset glow on focus state, using a negative spread with a brand-colour tint; the inset toggle and colour picker in this tool make that immediately approachable. Front-end developers, UI designers, and no-code builders who work with component libraries or design systems benefit most from having a dedicated visual editor rather than relying on raw syntax memorisation. All processing runs entirely in your browser — no values are sent to any server, so shadow styles for proprietary design systems stay completely private. The finished declaration copies straight into your CSS, Tailwind config, or CSS-in-JS style object without any modification needed.

Shadow 1
X Offset2px
Y Offset4px
Blur16px
Spread0px
Opacity30%
Color
CSS Output
box-shadow: 2px 4px 16px 0px rgba(0,0,0,0.30);

How to use CSS Box Shadow Generator

  1. 1.Use the horizontal offset, vertical offset, blur radius, and spread radius sliders to position and size your shadow.
  2. 2.Pick a shadow colour using the colour picker — adjust opacity for subtle or dramatic effects.
  3. 3.Toggle 'Inset' to switch between an outer drop shadow and an inner shadow.
  4. 4.Add multiple shadow layers by clicking 'Add Shadow' — combine them for complex effects.
  5. 5.Copy the generated CSS property (e.g. box-shadow: 5px 5px 15px rgba(0,0,0,0.3)) and paste it into your stylesheet.

Key Features

Visual slidersAdjust X offset, Y offset, blur radius, and spread with real-time sliders — no guessing pixel values.

Multiple shadowsStack multiple shadow layers on a single element for complex lighting effects.

Inset supportToggle between outer drop shadows and inner inset shadows.

Live previewSee your shadow on a preview box that updates as you drag the sliders.

Frequently Asked Questions about CSS Box Shadow Generator

Use the sliders above to set the horizontal offset, vertical offset, blur radius, spread radius, and colour. The CSS code updates live — copy it and paste into your stylesheet.
Share:
All Tools