Pricing
Home/Free tools/Box shadow generator
Updated November 24, 2026

Box shadow generator

Layered CSS box shadows previewed on a card, with the CSS to copy

  • Free, no account needed
  • Runs in your browser: nothing you type is sent anywhere

Shadow layers

A few soft layers look more natural than one heavy shadow. The first layer is drawn on top.

  1. Layer 1

    px
    px
    px
    px

    Lower the opacity in the picker, or type rgba(), for a soft shadow

  2. Layer 2

    px
    px
    px
    px

    Lower the opacity in the picker, or type rgba(), for a soft shadow

Preview surface

px

For the preview only; the shadow follows whatever radius the box has

box-shadow:
  0 1px 2px 0 rgba(15, 23, 42, 0.08),
  0 12px 32px -8px rgba(15, 23, 42, 0.18);

Layers are separated by commas. The first one is drawn on top of the others.

What box-shadow draws

The CSS box-shadow property paints one or more shadows around an element, or inside it with the inset keyword. Each shadow is a copy of the box’s outline, including its rounded corners, moved, blurred and grown or shrunk, then filled with a color.

Shadows take up no room in the layout, so adding one never pushes other elements around. A parent with overflow: hidden can cut them off, though, which is worth knowing when a shadow seems to stop at an edge.

The parts of a shadow

The two offsets move the shadow right and down; negative values move it left and up. Blur softens the edge, and 0 gives a hard edge. Spread grows the shape before it is blurred, or shrinks it with a negative value, which keeps a wide blur from showing at the sides.

Several shadows are separated by commas, and the first one is painted on top. A common pattern pairs a small, darker shadow close to the box with a wide, faint one further away.

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

0 12px 32px -8px rgba(15, 23, 42, 0.18)

x       0      no sideways shift
y       12px   12px down, as if lit from above
blur    32px   a soft edge
spread  -8px   8px smaller on every side
color          dark blue-grey at 18% opacity

Shadows in a design system

Shadows work best as a small, fixed scale of elevation levels rather than a new value for every component. Name the levels, keep them as tokens and use the same few everywhere, so cards, menus and dialogs read as part of one interface.

On dark backgrounds shadows barely show. Many dark themes raise elements with a slightly lighter surface instead and keep shadows for separation where they are still visible.

  • Define three or four elevation levels as tokens and reuse them
  • Tint shadows toward the background’s hue instead of pure black
  • Pair a tight, darker layer with a wide, faint one
  • Check the shadow on the real background color, not only on white
  • Hand developers the CSS with the token name next to it

A tool by Lyniti

From brief to approved design in one place

Lyniti keeps briefs, visual files, client feedback and approvals together with schedules and billing for each project, so a studio’s design decisions stay where the work is.

See Lyniti for design studios →

Related tools

All free tools →
  • CSS gradient generator→Linear, radial and conic gradients from color stops, as CSS to copy
  • Px to rem converter→Pixels to rem and back for any root size, with a table to copy from
  • Color converter→One color as HEX, RGB, HSL, OKLCH and OKLab, ready to copy

Embed this tool

Add it to your own site or help centre. It runs in your visitors’ browsers, like here, and links back to this page.

<iframe src="https://lyniti.com/tools/box-shadow-generator/embed" title="Box shadow generator" width="100%" height="760" style="border:0;max-width:100%" loading="lazy"></iframe>

Frequently asked

questions

What do blur and spread do in box-shadow?

Blur sets how soft the shadow’s edge is: 0 is a sharp edge and larger values fade it over a wider area. Spread makes the shadow larger before blurring, or smaller with a negative value. A negative spread with a larger Y offset gives a shadow that shows mostly below the box.

How do I make an inner shadow?

Add the inset keyword, or tick Inset for that layer above. The shadow is then drawn inside the box’s border, which suits pressed buttons, wells and input fields.

Why use several shadow layers?

Real shadows are sharp and dark close to an object and soft further away. One tight layer and one wide, faint layer imitate that better than a single shadow, which tends to look either hard or blurry.

Does a box shadow change the layout?

No. A shadow takes up no space, so it never moves other elements. It can be clipped by a parent with overflow: hidden, so leave enough room around the element or move the clipping to another wrapper.

Projects, clients and finance in one workspace

Lyniti helps agencies, consultancies, studios, and service teams manage projects, clients, approvals, invoices, bookkeeping, and finance in one workspace.

See it in actionSee it in actionSee Pricing

The all-in-one business collaboration platform that replaces multiple tools, streamlines workflows, and reduces costs for modern teams.

Product

  • Features
  • Pricing
  • Documentation

Features

  • Chat
  • Bookkeeping
  • Double-entry
  • Finances
  • Financial Approvals
  • Invoices
  • Whiteboard
  • Files
  • Meet
  • Tasks
  • Calendar
  • CRM

Solutions

  • Agencies
  • Operations
  • Finance & Admin
  • Projects
  • Freelancers
  • Governance
  • Teams + Finance
  • Projects + Bookkeeping
  • Design studios
  • Consultants
  • Remote teams
  • Projects + Invoicing
  • Client Portal
  • Projects + Approvals

Compare

  • vs 17hats
  • vs Airtable
  • vs Asana
  • vs Basecamp
  • vs ClickUp
  • vs Discord
  • vs Dropbox
  • vs Google Workspace
  • vs Jira
  • vs Linear
  • vs Microsoft Teams
  • vs Miro
  • vs monday.com
  • vs Notion
  • vs Plutio
  • vs QuickBooks
  • vs Rock
  • vs Salesforce
  • vs Slack
  • vs Smartsheet
  • vs Trello
  • vs Wimi
  • vs Wrike

Free tools

  • Invoice generator
  • Quote generator
  • VAT calculator
  • Profit margin calculator
  • Hourly rate calculator
  • Gantt chart maker
  • Online whiteboard
  • Time zone meeting planner
  • UTM builder
  • Email signature generator
  • Image resizer
  • Color contrast checker
  • QR code generator

Company

  • About
  • Blog
  • support@lyniti.com
  • Service status

Legal

  • Trust Center
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • Data Processing Agreement
  • Imprint

© 2026 Lyniti. All rights reserved.

Made with love and Lyniti