🎨 CSS Box Shadow Generator

Create beautiful CSS box shadows with live preview. Easily generate box-shadow CSS code with our free online tool. Perfect for web designers and developers looking to add depth and dimension to their designs. Supports all modern browsers and mobile devices.

Horizontal Offset 0px

Vertical Offset 10px

Blur Radius 20px

Spread Radius 0px

Shadow Color

Inset Shadow

Presets

Your Shadow
Preview

Adjust the controls to see changes in real-time

Generated CSS

box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.2);

💡 What is Box-Shadow in CSS?

The CSS box-shadow property allows you to add shadow effects around an element's frame. You can specify multiple effects by separating them with commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.

Box Shadow Syntax

box-shadow: [horizontal offset] [vertical offset] [blur radius] [spread radius] [color] [inset];

💡 Pro Tip

Use box-shadow instead of the older text-shadow for better performance and more control over the shadow appearance. Box shadows are hardware-accelerated in most browsers, making them more efficient for animations and transitions.

🪄 How to Use the Box Shadow Generator

1

Adjust the Controls

Use the sliders to adjust the horizontal and vertical offset, blur radius, and spread of your shadow. The preview updates in real-time as you make changes.

2

Customize the Color

Click on the color picker to choose a custom shadow color. You can also enter a hex code manually for precise color matching.

3

Try Presets

Use the preset buttons to quickly apply popular shadow styles. You can further customize these presets to fit your needs.

4

Copy & Paste

Once you're happy with your shadow, click the "Copy CSS" button to copy the generated CSS code to your clipboard. Paste it directly into your stylesheet!

🎨 Why Designers Love Box Shadows

Box shadows are an essential tool in modern web design. Here's why designers love them:

Depth & Dimension

Shadows create a sense of depth, making flat designs feel more three-dimensional and interactive.

Visual Hierarchy

Use shadows to draw attention to important elements and establish a clear visual hierarchy.

Subtle Enhancements

Light shadows can add subtle polish to buttons, cards, and other UI elements without overwhelming the design.

💡 Best Practices

  • Use subtle shadows for a clean, modern look (e.g., 0 2px 8px rgba(0,0,0,0.1))
  • Larger blur values create softer, more diffused shadows
  • Negative spread values make the shadow smaller than the element
  • Use inset for inner shadows that make elements appear pressed or embedded

❓ Frequently Asked Questions

The CSS box-shadow property allows you to add shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.
How do I use the Box Shadow Generator?
Simply adjust the sliders for horizontal/vertical offset, blur, and spread. Use the color picker to choose a shadow color. Toggle the 'Inset' option if you want the shadow inside the element. The CSS code updates in real-time and can be copied with one click.
What's the difference between blur and spread radius?
Blur radius determines how much the shadow is blurred - a larger value creates a more blurred effect. Spread radius expands or contracts the shadow - positive values cause the shadow to expand, while negative values cause it to contract.
What are inset shadows?
Inset shadows are drawn inside the border (above the background, but below the content). They make elements look like they are pressed into the page, creating a 3D effect that can be used for various design purposes like buttons, panels, and more.
Is this tool free to use?
Yes, our CSS Box Shadow Generator is completely free to use with no limitations. You can generate as many shadows as you need without any watermarks or required sign-ups.
CSS copied to clipboard!