Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Web Tools
  3. CSS Box Shadow Generator
Add to favorites

CSS Box Shadow Generator

Design layered CSS box shadows with live preview on light or dark, twelve presets, inset shadows, and a box-shadow line to copy.

Runs locally in your browserMore web toolsJump to full guide
Related readingCSS Box Shadows: From Subtle Depth to Dramatic Effects12 min

Initializing in your browser…

You might also like

CSS Button Generator

Design a CSS button with hover, pressed, focus and disabled states, each checked against WCAG contrast, and copy the CSS and HTML.

Mock Data Generator

Generate realistic test data as JSON, CSV or SQL: valid card numbers and IBANs, safe example e-mails, and a seed that brings the same rows back.

CSS Gradient Generator

Design linear, radial and conic CSS gradients with live preview, vivid colour-space blending, and CSS or Tailwind code to copy.

CSS Box Shadow Generator: a worked example

You want a product card to look as if it is lifted off the page, softly, without a hard dark edge.

Settings

Preset: Large (two layers)
Then layer 1 colour changed to #3b82f680 with opacity 50%
What CSS Box Shadow Generator produces

The CSS the tool writes

Large preset:
box-shadow: 0px 10px 15px -3px rgb(0 0 0 / 0.1), 0px 4px 6px -4px rgb(0 0 0 / 0.1);

After the colour change, layer 1 becomes:
0px 10px 15px -3px rgb(59 130 246 / 0.251)

The Large preset uses two layers. The first is offset 10px down with a 15px blur and a -3px spread, so it is soft and stays under the card instead of spreading past its sides; the second is a tighter 4px shadow that anchors the card to the surface. Both are black at only 10% opacity. Changing the first colour to #3b82f680 shows how transparency combines: the 80 at the end of the hex code is an alpha of 128 out of 255, about 50%, and the opacity slider at 50% halves it again, so the shadow is written with an alpha of 0.251.

About the Box Shadow Generator

Design CSS box shadows visually, from a subtle card lift to a layered elevation or a neon glow, and copy the box-shadow line. Stack as many layers as you need, reorder them, switch any of them to an inset shadow, and preview on a light or dark page.

Key features

  • Unlimited shadow layers with reorder, hide and delete
  • Offset, blur, spread, colour, opacity and inset for every layer
  • Any CSS colour notation, including eight-digit hex with alpha
  • Broken layers flagged and left out so the rest still render
  • Twelve presets, from Subtle and Layered to Glow, Neon and 3D Button
  • Light and dark preview backgrounds with your box colour and radius
  • One-click copy and shareable links that keep the whole design

How to use

  1. 1Start from a preset such as Medium, Soft or Layered, or adjust the default layer.
  2. 2Drag Offset X, Offset Y, Blur and Spread, then set the colour and opacity.
  3. 3Press Add layer to stack another shadow, and use the arrows to reorder layers.
  4. 4Switch the preview between Light and Dark, and set the box colour and corner radius to match your design.
  5. 5Press Copy CSS and paste the box-shadow line into your stylesheet.

Building a shadow that looks real

One layer at a time. Each shadow layer has five settings. Offset X and Offset Y move the shadow right and down (negative values move it left and up). Blur softens its edge; zero gives a hard, solid copy of the shape. Spread grows or shrinks the shadow before it is blurred, and a negative spread pulls it in under the element so a soft shadow does not bleed out to the sides. The colour and opacity set how dark it is, and Inset paints the shadow inside the box so the element looks pressed in.

Why several layers look better. A real object casts a shadow that is dark and sharp close to it and fades into a wide, faint blur further away. One CSS shadow cannot do both, so modern designs stack two to five. The Medium and Large presets pair a soft shadow with a tighter one underneath, and Layered stacks five shadows at 1, 2, 4, 8 and 16 pixels, each at only 5% opacity, for a very natural falloff. The first layer in the list is painted on top of the rest; the arrow buttons change the order and the eye button hides a layer without deleting it.

Colours that always work. Type a colour in any CSS form: #f00, #3b82f6, an eight-digit hex with its own transparency, a name such as rebeccapurple, or rgb(), hsl() and newer notations. The opacity slider multiplies any transparency the colour already has, so #3b82f680 at 50% opacity comes out at about 25%. The output always uses the modern rgb(r g b / alpha) form, which every current browser understands.

Mistakes that would hide every shadow. A box-shadow with several layers is accepted or rejected as a whole: one unreadable colour or impossible value anywhere and the browser silently drops all of them. The generator checks every layer, marks a broken one in red with the reason, and leaves just that layer out of the CSS so the rest keep working. Values from a shared link are checked the same way.

Preview and share. The preview box takes your own colour and corner radius, and the Light and Dark buttons switch the page behind it, because a shadow that looks right on white can disappear on a dark background. Your layers, colour and radius are kept in the page address, so you can bookmark the design or send it with the share button. Everything runs in your browser.

Examples

  • A card that floats

    The Large preset gives 0px 10px 15px -3px and 0px 4px 6px -4px, both black at 10% opacity: a soft lift with a tighter contact shadow.

  • A focus glow

    The Glow preset puts a 20px blur and 5px spread of blue at 50% evenly around the element, which makes a clear focus or highlight ring.

  • A recessed input

    The Inset preset paints 0px 2px 4px black at 20% inside the box, so a field looks pressed into the page.

  • A chunky button

    The 3D Button preset is a hard 4px drop with no blur in a darker shade, which reads as the side of the button rather than a shadow.

Tips & best practices

  • Keep shadow opacity low, usually 5 to 25%; real shadows are rarely black.
  • Tint the shadow with a dark version of the background colour for a more natural look.
  • Check the shadow on the Dark preview if your site has a dark mode; you may need a lighter glow instead.
  • Use the same few shadows across a design to show consistent levels of elevation.

Frequently asked questions

What does spread do?

It grows (positive) or shrinks (negative) the shadow before it is blurred. A negative spread keeps a soft shadow tucked under the element instead of spilling out at the sides, which is how most elevation shadows are built.

Why stack several shadows?

A single shadow is either sharp or soft. Real shadows are both: darker and tighter near the object and fainter further out. Two to five layers at increasing blur imitate that.

In which order are layers drawn?

The first shadow in the list is drawn on top, the last at the bottom. Use the arrow buttons to change the order.

Why is one of my layers marked in red?

Its colour or a value cannot be read by the browser. Because one invalid layer would make the browser ignore the entire box-shadow, the generator leaves that layer out until you fix it.

What does inset do?

It draws the shadow inside the element's border instead of outside, so the element looks sunk into the page, as in a pressed button or an input field.

Does box-shadow affect layout?

No. Shadows are painted outside the normal flow and do not take up space, so they never push neighbouring elements, although a parent with overflow hidden can clip them.

Related tools and how they differ

  • CSS Border Radius Generator: Shapes the corners of the same element, including elliptical corners, before you add its shadow.
  • CSS Button Generator: Builds a complete button with hover and focus states, where the shadow is one part of the design.
  • Glassmorphism Generator: Makes a frosted, see-through panel, a different way to lift an element off the page.

Further reading

  • CSS Box Shadows: From Subtle Depth to Dramatic Effects12 min read

Private by design

This runs as client-side JavaScript. Keys, tokens, payloads, and other inputs never leave your device.