box-shadow: 0px 4px 16px 0px rgba(0,0,0,0.20);Free CSS Box Shadow Generator Online
Generate CSS box shadows online for free. Create and preview box shadows visually.
Written & reviewed by Helperzy Editorial Team · Updated July 2026
How to Use Box Shadow Generator
Adjust Shadow Properties
Set the horizontal and vertical offsets, blur, spread and colour. Keep horizontal at zero and use a small positive vertical offset for the standard light-from-above look.
Preview
Watch the live element update as you drag each slider, and add a second or third layer to build convincing depth the way real design systems define elevation.
Copy CSS
Copy the generated box-shadow declaration into your stylesheet, comma-separated layers included. No vendor prefixes are needed for any current browser.
What the box-shadow Property Does and How to Tune It
The box-shadow property is how CSS creates the illusion of elevation, and it packs a lot into one line: horizontal offset, vertical offset, blur radius, spread radius, a colour, and optionally the inset keyword. Six values, most of them interacting, which is why editing them blind and reloading the page is such a poor way to work. This generator gives you sliders and a colour picker with a live element showing the result, so you design by eye and copy the declaration when it looks right. UI developers building cards and modals, designers matching an existing design system, and anyone chasing that soft Material or neumorphic look all work this way. Each value does one specific thing. The horizontal offset pushes the shadow right when positive and left when negative; the vertical offset pushes it down or up. Together they imply where the light is coming from, and most interfaces put the light above, which means a positive vertical offset and zero horizontal. The blur radius controls edge softness: zero gives a hard-edged duplicate of the box, and larger values diffuse it outward. Spread grows or shrinks the whole shadow before the blur is applied, so a negative spread pulls a wide blur back in tightly. Colour is usually black with alpha rather than solid black, because a real shadow tints what is behind it rather than blocking it. Add inset and the entire shadow is drawn inside the border box instead of outside. Take a standard card shadow. Set horizontal 0, vertical 4px, blur 12px, spread 0, and colour rgba black at 15 percent opacity. That produces box-shadow: 0 4px 12px rgba(0,0,0,0.15), a shadow sitting slightly below the element with soft edges, enough to lift a card off the page without announcing itself. Now change the opacity to 1 for solid black and the same geometry looks like a printing error. Set the blur to 0 instead and you get a hard offset rectangle, the flat brutalist style. Finally add a second layer, 0 1px 3px rgba(0,0,0,0.1), in front of the first: the tight inner shadow defines the edge while the wide outer one supplies the ambient falloff, which is exactly how the elevation levels in most design systems are built. Real uses. A developer building a dropdown menu needs it to read as floating above the page rather than painted onto it, so a wide low-opacity shadow does that work in one line. A designer implementing pressed button states switches to inset so the surface appears pushed in on click, which gives the tactile feedback a colour change alone cannot. Someone recreating a neumorphic toggle pairs a light shadow on the top-left with a dark one on the bottom-right to fake a raised plastic surface. A team standardising elevation defines four shadow tokens once, from subtle to prominent, and uses only those across the product so depth stays consistent between screens. The mistake almost everyone makes at first is a single high-opacity shadow with a small blur. It reads as dirt rather than depth. Real light scatters, so two or three stacked layers at low opacity, separated by commas, produce a far more convincing result than any single shadow can. Keep the light direction consistent across your whole interface too; mixed directions look accidental. On performance: shadows never affect layout because they paint outside the box, but very large blurs on many elements, or animating the shadow itself on every frame, can cost frames on low-end phones, so animate opacity or transform on a pre-rendered shadow instead. The syntax needs no vendor prefixes in any current browser. Everything runs in your browser and nothing is uploaded.
Examples: Box Shadow Generator
Input
Horizontal 0, vertical 4px, blur 12px, spread 0, colour black at 15% opacity
Result
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
Zero horizontal offset with a small positive vertical offset places the shadow directly below the element, and 15% alpha keeps it reading as depth rather than a grey border.
Input
Two layers: 0 1px 3px black at 10%, plus 0 8px 24px black at 12%
Result
box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.12);
The tight first layer defines the element edge while the wide second layer supplies ambient falloff, which is why stacked low-opacity shadows look far more natural than one strong shadow.
Frequently Asked Questions – Box Shadow Generator
Use Helperzy Box Shadow Generator to adjust the offset, blur, spread, and color with sliders and a color picker while a live element shows the result. When the shadow looks right, copy the generated CSS. There is no signup and nothing is uploaded — everything runs in your browser, so you can experiment freely until the shadow matches your design.
Related Developer Tools
View all Developer toolsUUID Generator
UUID Generator creates random UUIDs (v4) and GUIDs online for free. Generate unique identifiers instantly for databases, APIs, and development. No signup needed.
Image to Base64 Converter
Image to Base64 Converter encodes any image into a Base64 data URI online for free. Get ready-to-use CSS and HTML code in your browser.
JSON to YAML Converter
JSON to YAML Converter changes JSON into clean YAML instantly online for free. Validate and convert config data in your browser with no upload.
Cron Expression Generator
Cron Expression Generator builds and explains cron schedules online for free. Create cron expressions with a plain-English description in your browser.
🔥 Trending Tools
Image Resizer
Image Resizer changes image dimensions online — set exact pixels, use percentage scaling, or pick from 12 presets (Instagram, Passport, YouTube, etc.). Target specific file sizes like 50KB or 100KB. Batch resize multiple images. 100% free, browser-based.
Image Converter
Image Converter changes images between any format online free — JPG, PNG, WebP, AVIF, PDF, ICO, BMP, HEIC, GIF, SVG. Batch conversion, resize, rotate, flip, AI format recommendation. 100% browser-based, no upload.
JPG to WebP Converter
Convert JPG to WebP format online free — reduce image file size by 25-35% with identical visual quality. Batch conversion, adjustable quality, lossless mode available. Boost website speed and Core Web Vitals scores. 100% browser-based, no upload needed.
PNG to WebP Converter
Convert PNG to WebP format online free — reduce file size by 26-34% while preserving full transparency. Batch conversion, lossless and lossy modes, adjustable quality. Boost website performance and Core Web Vitals. 100% browser-based, no upload needed.