CSS box-shadow generator

    Build layered CSS box-shadows visually and copy the code.

    Preview

    Made in your browser. Nothing is uploaded.

    About the CSS Box Shadow Generator tool

    This CSS box shadow generator creates the box-shadow property with sliders for horizontal and vertical offset (−100 to 100 px), blur (0 to 150 px), spread (−50 to 50 px), colour and opacity, and shows it on a preview card. You can stack up to 4 shadow layers, make any of them inset, and change the box and page colours to match your design. The copied CSS uses rgba() colours, such as 0 8px 24px -4px rgba(15, 23, 42, 0.22) for the default layer.

    At a glance

    Layers
    Up to 4, each can be inset
    Ranges
    Offset −100 to 100 px, blur 0–150 px, spread −50 to 50 px
    Colour
    Any colour with 0–100% opacity, written as rgba()
    Price
    Free, no sign-up
    Works in
    Your browser, on phone or computer. Works offline after the first visit.
    Privacy
    What you type never leaves your device.

    How to make a CSS box shadow

    1. Move the offset, blur, spread and opacity sliders and pick a shadow colour.
    2. Add more layers or tick Inset for an inner shadow.
    3. Press "Copy CSS" and paste it into your stylesheet.

    Private

    Your text stays in your browser and is never sent to a server.

    Instant

    Results update as you type, with nothing to install.

    Free

    No sign-up, no limits and no ads inside your writing space.

    CSS Box Shadow Generator: frequently asked questions

    What do the four numbers in box-shadow mean?

    In order: horizontal offset, vertical offset, blur radius and spread radius. For example box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.25) is a soft shadow 4px below the box.

    Why use several shadow layers?

    Real shadows are soft and sharp at the same time. A small, darker layer plus a large, faint one looks more natural than one big shadow.

    What does a negative spread do?

    It shrinks the shadow before it is blurred, so the shadow stays under the box instead of spreading out to the sides.

    How do I put a box shadow on only one side?

    Offset the shadow towards that side and use a negative spread about as large as the blur. For example, 0 8px 6px -6px rgba(0, 0, 0, 0.3) shows a shadow only under the box, because the spread pulls it in from the left and right.