- All tools
- CSS box-shadow generator
How do I create a CSS box-shadow?
Use the sliders to set the offset, blur, spread and colour of each shadow layer, and the page writes the box-shadow and border-radius CSS for you, ready to copy. You can stack up to six layers, start from a preset, paste an existing box-shadow to edit it, and judge the result on a light or dark background. The preview is your browser's own rendering of the CSS, so what you see is what you get.
- Pick a preset or adjust the sliders of the first layer.
- Add layers, set the corner radius and check it on a light and a dark background.
- Copy the CSS and paste it into your stylesheet.
The preview colours are only for judging the shadow; they are not part of the CSS.
Corner radius
Shadow layers
CSS
filter: drop-shadow() version for transparent images
drop-shadow() follows the visible shape of an image. It has no spread and no inset, so those parts of your layers are left out; inset layers are skipped.
Load an existing box-shadow
What this page can do
- Stack 1 to 6 shadow layers with x offset, y offset, blur, spread, colour with alpha and an inset switch
- Add, duplicate, remove and reorder layers; the first layer is drawn on top
- Round the corners equally or one by one, in px or %
- Preview on light, dark or your own colours, independent of the site theme
- Ten presets, from soft and layered to neumorphic, glow, inset and long shadows
- Read an existing box-shadow value back into the editor, and export a drop-shadow() filter
When to use this page
- Designing a card, button or modal shadow and copying the finished CSS.
- Tuning a shadow you already have: paste it, adjust one layer, copy it back.
- Checking how a shadow looks on both a light and a dark background before choosing it.
When to use something else
- You need a shadow for text: text-shadow has no spread or inset and is a different property.
- Your shadow uses CSS variables, calc() or currentColor: those values cannot be loaded here.
- You want shadows driven by a design-token system; use the tokens in your own codebase.
How it compares with other options
Browser developer tools let you edit a shadow on a live page, but they do not offer presets or a stacked layer list. Other online generators are often limited to a single layer, or show a preview that is a picture rather than your browser's own rendering. This page draws the preview with real CSS, so it looks the way the copied code will look in the same browser, and it keeps the output small: plain box-shadow and border-radius, with no vendor prefixes.
Where your data goes
Nowhere. This page loads the code that does the work, and from then on everything you set or paste is handled by your own browser. Nothing is uploaded or saved. You can check it yourself: open your browser's network panel while you use the tool; the page still loads its own code and any ads, but no request carries what you type.
Questions about this tool
Do I need -webkit-box-shadow or other vendor prefixes?
No. Every current browser supports the standard box-shadow property without a prefix, and the -webkit-box-shadow and -moz-box-shadow prefixes are no longer needed, so this page does not output them. Only add them if you must support browsers from before 2013.
What is the difference between blur and spread?
Blur softens the edge of the shadow: 0 gives a hard edge and larger values fade it out over a wider area. Spread grows or shrinks the shadow before it is blurred; a negative spread with a positive y offset is the usual way to make a shadow that appears only under the box.
When should I use filter: drop-shadow() instead of box-shadow?
Use drop-shadow() on images with transparent areas, such as PNG or SVG logos, because it follows the visible shape instead of the rectangular box. It has no spread value and no inset option, so only the first three lengths and the colour of each layer are used. Several shadows are written as several drop-shadow() functions in a row.
Can I load a box-shadow I already have?
Yes. Paste the value into the box under the preview, with or without the box-shadow: prefix, and press Load. Several comma-separated layers, inset, and colours written as hex, rgb(), rgba(), hsl(), hsla() or a colour name are understood. Values such as var(--shadow), currentColor or calc() cannot be read and are reported as an error.