TapCub is live — analytics, insights and live chat, free on one platform

Free tool Box shadow generator for layered CSS shadows

Drag the offset, tune blur and spread, and add layers until the card looks right. The preview renders the exact rule you copy, including corner radius and colors. Presets cover everyday elevation, hard retro shadows, glows, inset wells and neumorphism.

  • Multiple layers and inset
  • Touch-friendly offset pad
  • Runs locally

Shape the shadow, copy the CSS

The sample is a two-layer card shadow. Pick a layer to edit it, or start from a preset.

Generator

With a mouse or pen you can also drag directly on the preview to move the selected layer.

Layers (the first one is drawn on top)

Presets

Editing layer 1

Drag the dot to set the offset. The center is no offset; the edges are 100 px. Arrow keys move 1 px, with Shift 10 px.

Box and background

Set each corner
CSS
.box {
  width: 220px;
  height: 150px;
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow:
    0 10px 25px -5px rgba(15, 23, 42, 0.18),
    0 4px 10px -6px rgba(15, 23, 42, 0.16);
}
Declaration only
box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 4px 10px -6px rgba(15, 23, 42, 0.16);
Tailwind class
shadow-[0_10px_25px_-5px_rgba(15,23,42,0.18),0_4px_10px_-6px_rgba(15,23,42,0.16)]
Runs entirely in your browser. Nothing you type here is uploaded or stored by TapCub.

Share these inputs: the values go after the # in the link, so they never reach a server.

Use this tool often? Save it to My tools.Saved to My tools. Find it any time at the top of the free tools page. You can also press Ctrl+D to bookmark this page in your browser.You can also press ⌘+D to bookmark this page in your browser.You can also tap your browser’s Share button (at the bottom in Safari) and choose Add Bookmark or Add to Home Screen.You can also open the ⋮ menu at the top right and tap ☆ to bookmark it, or choose Add to Home screen.You can also tap ··· at the top right and choose Favorite, or open it in your browser and bookmark it there.

Problem or suggestion?Send feedbackChat with support

Version v1.0Updated Update history

Read the values

The four lengths in a shadow

A shadow reads as x y blur spread color, with inset optionally in front.

  • Up to eight layers, inset too
  • Presets including soft and neumorphism
  • CSS and Tailwind output
Box shadow generator illustration: Stack several shadows, drag the offset, round the corners and copy CSS or a Tailwind class
Box shadow generator, illustrated

Offsets x and y

Positive x pushes the shadow right, positive y pushes it down. A downward offset with no sideways offset reads as light coming from above.

Blur radius

Zero gives a crisp copy of the box. The specification approximates the blur with a Gaussian whose standard deviation is half this radius, so the soft edge extends roughly this far beyond the shape.

Spread

Grows the shadow when positive and shrinks it when negative, and adjusts the corner radii to match. A negative spread tucks the shadow under the box so only the bottom shows.

Color and opacity

Low-opacity dark colors look natural. Tinting the shadow toward the background hue looks less dirty than pure black.

Shadows never change layout: they do not push neighbours and do not create scrollbars. Leave room yourself if a large shadow should not be covered by the next element.

How to use it

Build elevation in layers

Two or three soft layers usually look better than one heavy one.

  1. 1

    Pick a preset

    Start close to what you want: subtle for list rows, medium for cards, large for popovers.

  2. 2

    Tune a layer

    Select it, drag the offset pad, then set blur, spread, color and opacity.

  3. 3

    Add contact shadow

    A second layer with a small blur anchors the element to the surface, while a larger one gives distance.

  4. 4

    Match the box

    Set the corner radius and background to your design, then copy the whole rule or just the declaration.

Syntax

How multiple shadows stack

Separate shadows with commas. Their order is their depth.

  • The first shadow in the list is painted in front; each later one sits behind it
  • Inner shadows sit above the element’s background and below its border
  • Corner radius shapes the shadow; spread enlarges or reduces that radius
  • filter: drop-shadow() follows the transparent outline of an image or icon, which box-shadow does not

Order of values

box-shadow: [inset] x y [blur] [spread] [color], …;

Only x and y are required. Without a color, the shadow takes the element’s text color.

Reach below the box

y + spread + blur

A rough upper bound of how far the soft edge extends under the element.

Worked example

The sample card shadow, layer by layer

The sample uses 0 10px 25px -5px at 18% and 0 4px 10px -6px at 16%, both in #0f172a.

Approximate reach of each layer on each side of the box
LayerBelow (y + spread + blur)Sides (spread + blur)Above (−y + spread + blur)
1: y 10, blur 25, spread −510 − 5 + 25 = 30 px−5 + 25 = 20 px−10 − 5 + 25 = 10 px
2: y 4, blur 10, spread −64 − 6 + 10 = 8 px−6 + 10 = 4 px0 px

The first layer gives the soft distance, the second the tight contact line under the card. Both pull in at the sides thanks to the negative spread, so the card looks lifted rather than outlined.

Common mistakes

Shadows that look cheap or vanish

Small changes make most of the difference.

Pure black at high opacity

A 50% black shadow looks like a smudge. Try 8–20% and a color tinted toward the background.

Clipped by a parent

A parent with overflow: hidden cuts the shadow off. Add padding to that parent or move the clipping elsewhere.

Neumorphism without contrast

Soft two-tone shadows make buttons hard to find. Add a border or color cue for controls that people must notice.

Animating big blurs

Transitioning a large shadow repaints on every frame. Cross-fade a pseudo-element that already has the bigger shadow instead.

FAQ

Box shadow questions

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is the CSS box-shadow syntax?

box-shadow: [inset] offset-x offset-y blur spread color;. Only the two offsets are required. Add more shadows separated by commas.

How do I put a shadow on one side only?

Offset toward that side and use a negative spread about as large as the other sides would show, for example 0 8px 8px -6px for a bottom edge. The Bottom edge preset does this.

How do I make an inner shadow?

Tick Inset, or add the word inset before the values. The shadow is then drawn inside the box, above its background.

What is the difference between box-shadow and drop-shadow?

box-shadow follows the element’s rectangle and corner radius. filter: drop-shadow() follows the visible pixels, so it suits transparent PNG or SVG shapes, but it has no spread value.

How do I create a neumorphism effect?

Give the box the same color as the page, then add a darker shadow down and right and a lighter one up and left, with equal offsets and blur. The Neumorphism and Pressed presets show both states.

Do box shadows affect page layout?

No. They do not take up space or add scrollable area. If a shadow is cut off or covered, add margin, padding or a higher stacking order.

Can I share a shadow I designed?

Yes. The share link keeps every layer and box setting after the # in the address; that part is not sent to the server.

Feedback

Is this tool working for you?

Rate it, or tell us what went wrong and what you’d like improved. A person reads every message, and frequent requests go into the next update.

Rate this tool

Please don’t include passwords or other sensitive information.

Only used to reply to this feedback.

Type, details and email are required.

We only use this to handle your feedback. See the privacy policy.

Feedback received

Thank you! We will read it and reply from hello@tapcub.com if needed.

Need help right now?

Chat with our support team, best for urgent problems; you can leave a message when we are offline.

Chat with support
Changelog

Update history

New features, fixes and data refreshes for this tool, newest first.

  1. · v1.0

    LaunchedFirst release.

Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates

Cite this tool

Recommend this tool in an article or on your site

This tool is free to cite and share. Copy the URL or link below into your article, tutorial or resource page; to write a review, embed a tool or partner with us, get in touch.

URL
https://tapcub.com/tools/box-shadow-generator
HTML link
<a href="https://tapcub.com/tools/box-shadow-generator">Box shadow generator - TapCub</a>

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics