Box Shadow Generator
Drag the sliders, watch the shadow update live, and copy ready-to-paste CSS box-shadow code.
✔ 100% Free✔ No Signup✔ No Watermark✔ Unlimited Use
Design a CSS shadow without writing code
The box shadow generator turns four numbers and a color into a clean CSS box-shadow rule you can paste straight into a stylesheet. Drag a slider and the preview box updates the moment you move, so you see exactly how offset, blur, and spread change the depth before you commit.
It handles the tedious part for you: converting your picked color and opacity into an rgba() value and assembling the shorthand in the correct order. Toggle inset for an inner shadow, tune the opacity for a soft or sharp edge, then copy both the standard and -webkit- prefixed versions in a single click.
How to Use the Box Shadow Generator
- 1Set the offsets. Drag horizontal and vertical to move the shadow left/right and up/down.
- 2Shape the edge. Raise blur for a soft glow, adjust spread to grow or shrink the shadow, and set opacity for strength.
- 3Pick a color and check Inset if you want an inner shadow instead of a drop shadow.
- 4Click Copy CSS and paste the
box-shadowrule into your stylesheet.
Why Use MakeToolz's Box Shadow Generator?
Live preview
The sample box re-renders on every slider move so you never guess how the shadow looks.
Correct shorthand
Values are assembled in the exact CSS order: offset-x, offset-y, blur, spread, then color.
Opacity to rgba
Your color and opacity slider combine into a proper rgba() value automatically.
Inset toggle
Switch between a normal drop shadow and an inner inset shadow with one checkbox.
Vendor prefix included
Copy ships both the standard rule and a -webkit- prefixed line for older browsers.
Runs in your browser
Everything is computed client-side, so nothing you design is uploaded anywhere.
Who Uses a Box Shadow Generator and Why
Front-end developers, web designers, and no-code builders reach for a box shadow generator whenever they want depth on a card, button, modal, or image without hand-tuning numbers in a text editor. Instead of saving a file and refreshing the browser after every tweak, they drag a slider and watch the effect appear instantly. That tight feedback loop turns a fiddly guessing game into a few seconds of visual work.
The audience is broader than professional coders. Students learning CSS use it to understand what each value actually controls. Marketers and hobbyists building landing pages copy the finished rule into a website builder or email template. Anyone who needs a shadow that looks intentional, rather than the harsh default, benefits from seeing the preview and the code side by side.
What Each Box Shadow Value Controls
- Offset X: Pushes the shadow left with a negative value or right with a positive value.
- Offset Y: Pushes the shadow up with a negative value or down with a positive value, which is how you fake a light source overhead.
- Blur radius: Softens the shadow edge. Zero gives a hard edge, larger numbers give a diffuse glow.
- Spread radius: Grows the shadow larger than the element with a positive value or pulls it in with a negative value.
- Inset: Flips the shadow inward so it appears carved into the element instead of floating behind it.
How the Box Shadow Is Built
When you move any slider, the tool reads the current offset, blur, spread, opacity, and color, then assembles them into the CSS shorthand in the order the specification requires. Your picked hex color is split into red, green, and blue channels and combined with the opacity slider to produce an rgba() value, so you control transparency without touching the element itself. The preview box has that exact rule applied, which is why what you see matches what you copy.
The generator focuses on a single well-formed shadow so the output stays clean and predictable. It does not stack multiple shadows for you, animate the shadow, or convert to filter-based drop shadows, so if you need layered or animated effects you will combine several outputs by hand in your stylesheet. Everything runs locally in your browser with no account or upload.
Common Shadow Recipes to Start From
| Effect | Offset X / Y | Blur / Spread | Opacity |
|---|---|---|---|
| Subtle card lift | 0px / 4px | 12px / 0px | 15% |
| Floating modal | 0px / 20px | 40px / -8px | 25% |
| Hard designer shadow | 8px / 8px | 0px / 0px | 100% |
| Soft glow | 0px / 0px | 30px / 4px | 40% |
| Pressed inset field | 0px / 2px | 6px / 0px (inset) | 20% |
| Long ambient shadow | 0px / 30px | 60px / 0px | 18% |
Common Mistakes and Tips
The most frequent mistake is cranking opacity and blur too high, which produces a muddy gray cloud rather than a believable shadow. Real shadows are usually low opacity and offset mostly downward, because light typically comes from above. Keep the offset X near zero for a natural drop shadow, and lean on blur plus low opacity for softness instead of a dark solid color.
Another trap is forgetting that spread and blur do different jobs: spread changes size, blur changes softness. If your shadow looks like a hard border, you probably need more blur and less spread. When you have your shadow, you can round the same element with the border radius generator, layer a frosted panel using the glassmorphism generator, or fine-tune colors with the hex to RGB converter.
People Also Ask
How do I make a soft, subtle box shadow?
Use a small vertical offset, a moderate blur, zero or slightly negative spread, and low opacity around 10 to 20 percent. This mimics gentle ambient light without a heavy edge.
What is the difference between blur and spread?
Blur softens the shadow edge while keeping its size, and spread makes the whole shadow larger or smaller than the element. They are independent controls.
How do I create an inner shadow in CSS?
Add the inset keyword at the start of the value, which this tool does when you check the Inset box. The shadow then appears inside the element.
Can box-shadow have multiple layers?
Yes. You separate complete shadow value sets with commas, and the browser paints them from front to back. Generate each layer here and combine them by hand.
Why use rgba instead of a hex color for shadows?
An rgba value carries an alpha channel, so you can set the shadow transparency directly. That gives softer, more realistic results than a fully opaque hex color.
Does box-shadow affect the element's size or layout?
No. A box shadow is painted outside the layout box and does not push other elements around, unlike a border. It is purely visual.
Is box-shadow supported in all browsers?
Yes, it is supported in every modern browser without a prefix. The tool still includes a -webkit- line for safety with very old versions.
How do I remove a box shadow?
Set the property to box-shadow: none; in your CSS. That clears any shadow applied by an earlier rule.
Frequently Asked Questions
What is the correct order of box-shadow values?
Can I add more than one shadow to an element?
Why does the tool output rgba instead of my hex code?
Does a bigger blur slow down my page?
Related Free Tools
More Developer Tools
JSON FormatterYAML to JSON ConverterJSON to CSV ConverterJWT DecoderHash GeneratorMD5 Hash GeneratorSHA-256 GeneratorCSS Grid GeneratorFlexbox GeneratorUUID GeneratorUnix Timestamp Converter