Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Craft CSS box-shadow code visually with controls for offset, blur, spread, color, and inset. Layer multiple shadows for realistic depth and copy the box-shadow value right in your browser.
box-shadow: 10px 10px 18px 0px rgba(0, 0, 0, 0.35);
-webkit-box-shadow: 10px 10px 18px 0px rgba(0, 0, 0, 0.35);
-moz-box-shadow: 10px 10px 18px 0px rgba(0, 0, 0, 0.35);The CSS Box Shadow Generator lets you craft shadows visually and copy the box-shadow code without trial and error in your editor. Drag the offset, blur, spread, and color controls, layer several shadows for realistic depth, and watch the preview update before you copy. It is built for front-end developers and designers who want clean, consistent shadows on cards, buttons, and other UI elements. Everything runs in your browser, so there is nothing to install and nothing to upload.
The Box Shadow Generator is a free online tool that produces CSS for the box-shadow property. box-shadow casts a shadow around an element's box, which makes it the standard way to give cards, buttons, modals, and inputs a sense of elevation. Because it follows the element's box and border-radius, it works perfectly for the rounded rectangles that make up most interfaces.
The tool exposes every part of the property through controls. You set the horizontal and vertical offset to choose the shadow's direction, blur to soften its edge, spread to size it, and a color with opacity. An inset toggle moves the shadow inside the element for a pressed effect, and you can stack several shadows to build depth.
You can design a polished shadow in well under a minute. Follow these steps:
Each value in a box-shadow declaration changes the look in a specific way. Here is what the controls do:
These two are easy to confuse, but they shadow elements in fundamentally different ways. This page focuses on box-shadow; the table shows when it is the right pick:
| Aspect | box-shadow | filter: drop-shadow() |
|---|---|---|
| What it shadows | The rectangular box of the element | The visible, non-transparent shape |
| Transparency | Ignored, shadows the whole box | Respected, follows the alpha edges |
| Inset support | Yes, with the inset keyword | No inset option |
| Best for | Cards, buttons, inputs, modals | Transparent PNGs, SVG icons, logos |
| Border-radius | Follows rounded corners | Follows the content shape directly |
If your element is a transparent image or an irregular icon, reach for the Drop Shadow Generator instead, which follows the actual shape of the content.
box-shadow is one of the most-used properties in interface design. These are the effects it handles best:
This tool is maintained by TestMu AI (formerly LambdaTest), the team behind a unified testing platform, so it is built with consistent cross-browser shadow rendering in mind.
box-shadow is a CSS property that casts a shadow around an element's rectangular box. You control the horizontal and vertical offset, blur, spread, and color, and you can add an inset keyword to draw the shadow inside the element instead.
List several shadow values separated by commas in a single box-shadow declaration. The browser stacks them in order, which lets you layer soft and sharp shadows to create realistic depth from one property.
box-shadow shadows the element's rectangular box and ignores transparency, which suits cards and buttons. filter drop-shadow follows the visible shape of the content, which suits transparent PNGs and SVG icons. Choose by whether your element is a solid box or an irregular shape.
Yes. box-shadow follows the element's border-radius, so a rounded element casts a rounded shadow. This is why box-shadow is a good fit for cards and pill buttons that already use rounded corners.
Use a zero or small offset, a large blur, no spread, and a bright color. Because the shadow spreads evenly around the element with no directional offset, it reads as a soft glow rather than a cast shadow.
Spread grows or shrinks the shadow before blur is applied. A positive spread makes the shadow larger than the element, while a negative spread pulls it in, which is useful for tight, subtle shadows under cards.
Static shadows are inexpensive, but animating large or numerous shadows can trigger repeated repaints. For smooth animation, prefer transform and opacity, and keep animated shadows small and few to avoid jank on lower-powered devices.
Yes, it is free with no signup and no limit. You can build and copy as many shadows as you need. The tool runs in your browser and is maintained by TestMu AI (formerly LambdaTest).
Did you find this page helpful?
Start your journey with TestMu AI
Get 100 minutes of automation test minutes FREE!!