Box Shadow Generator
Design box shadows with sliders — offset, blur, spread, opacity, and inset — and watch them live on a demo card. Copy the clean CSS when it looks right. Free, private, no signup.
Your CSS
How to design a box shadow
A box shadow paints a soft copy of your element's shape behind it — the oldest trick for making flat web pages feel like they have depth. One line of CSS, and cards lift off the page.
- Set the offsets. Vertical offset pushes the shadow down (positive) or up (negative); horizontal pushes it right or left. Zero both for an even glow.
- Soften with blur. 0 is a hard edge — crisp but harsh; 20–30px is the soft, expensive-looking range most designs live in.
- Shape with spread. Positive spread grows the shadow before blurring (bolder); negative spread shrinks it (crisper). 0 keeps it the element's size.
- Pick a color and opacity. Real shadows are translucent black — 20–35% opacity looks natural. For neon glow effects, use a bright color instead.
- Try inset for a pressed-in look, like buttons that are "on".
One shadow or many?
box-shadow accepts a comma-separated list — you can stack a soft wide shadow under a tight dark one for extra depth, like 0 2px 6px rgba(0,0,0,0.15), 0 12px 32px rgba(0,0,0,0.2). This builder makes one shadow at a time; paste several lines together when you want the layered look.
Soft shadows without the guesswork
The classic "lifted card" recipe is 0 12px 32px 0 rgba(0, 0, 0, 0.25): no horizontal shift, the shadow below, a big blur, no spread, and a quarter-opaque black. Start from the presets above and drag the sliders until it feels right — the preview shows exactly what your visitors will see.
- What do the four numbers in box-shadow mean?
- In order: horizontal offset (how far right or left), vertical offset (how far down or up), blur radius (how soft the edge is), and spread radius (how much the shadow grows).
0 0 0 0means no shadow at all. - What does the inset keyword do?
- Inset flips the shadow inside the box, so the element looks pressed or carved into the page instead of floating above it. It goes at the start of the value:
inset 5px 5px 10px rgba(0, 0, 0, 0.5). - Why is my shadow invisible?
- The three usual suspects: offsets of 0 with a small blur, opacity set to 0, or a shadow color identical to the background. Raise the blur, nudge the offsets, or check the opacity slider.
- How do I put a shadow on only one side?
- Use a single offset direction: a positive vertical offset puts the shadow below the box, a negative one above; positive horizontal goes right, negative goes left. Keep blur modest so it stays on that side.
- What does the spread value do?
- Spread grows or shrinks the shadow before blur is applied. Positive values make it bigger and bolder; negative values make it smaller and crisper. 0 keeps it exactly the element's size.
- Is my data sent anywhere?
- No. Everything runs in your browser with plain JavaScript. Nothing is uploaded or stored.
More from the codex
Box Shadow Generator
Sliders, live preview, and clean CSS for box shadows.
CSS Gradient Generator
Linear, radial, and repeating gradients with live preview.
Open tool → NewFlexbox & Grid Playground
Experiment with flexbox and grid layouts visually and copy the CSS.
Open tool → LiveColor Picker
Pick colors and get hex, RGB, and HSL codes instantly.
Open tool → LiveCSS Minifier
Shrink your CSS down for faster page loads.
Open tool → LiveMarkdown Previewer
Write Markdown and see it rendered live.
Open tool → LiveHTML Entity Codec
Encode and decode HTML entities.
Open tool → LiveJSON Formatter
Format and validate JSON in one click.
Open tool → LiveMeta Tag Generator
Build SEO and social meta tags for any page.
Open tool → LiveQR Generator
Make QR codes for any link or text.
Open tool → LiveWord Counter
Count words and estimate reading time instantly.
Open tool → LiveBase64 Encoder
Encode and decode Base64, URL-safe too.
Open tool →Support the codex
This tool is free, with no account and no ads. If it saved you a trip to a search engine, consider supporting the indie dev behind it.
Questions about this tool?
Found a wrong code or have a suggestion? Email [email protected] — every message is read by the indie dev behind the codex.