Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

CSS Box Shadow Generator

This tool writes a CSS box-shadow from offset, blur, spread, colour and opacity. It can add an inner shadow or a second soft layer, and shows a preview.

How to use CSS Box Shadow Generator online

  1. Set the offsets and blur. And the spread.
  2. Pick colour and opacity. Low opacity looks natural.
  3. Choose inset or a second layer. If you want them.
  4. Copy the CSS. Paste it into your stylesheet.

Why use this free CSS Box Shadow Generator

  • Offset, blur and spread
  • Colour with opacity
  • Inset shadows
  • Second soft layer
  • Old prefix option
  • Live preview

What box-shadow does

The box-shadow property draws a shadow around an element, such as a card, a button or a picture. It does not change the size or layout of the element. This tool turns the numbers you set into the value, so you can copy one line of CSS instead of guessing the order of the parts.

The numbers

The first two numbers move the shadow: a positive horizontal offset pushes it right and a positive vertical offset pushes it down. Blur softens the edge, and zero gives a hard edge. Spread makes the shadow bigger or, if negative, smaller than the element. The colour with its opacity sets how strong it looks, and a low opacity looks more natural than a solid black.

Inset and layers

The inset option draws the shadow inside the element, which looks like a pressed or hollow surface. The second soft layer adds a smaller, lighter shadow close to the element, which together with the main shadow gives a more natural depth. Layered shadows are separated by commas in the value.

What the preview shows

The preview draws a white card on a light background with the offset, blur and colour you set. It does not draw spread or inset shadows, and a note tells you when that applies. Browsers draw blur a little differently from the preview, so test the code in your page, on the real background, before you rely on it.

Good habits

Use soft, low-opacity shadows for most interfaces, and keep one direction of light across the page, so that all shadows fall the same way. Large blur values on many elements can slow scrolling on weak phones. The old -webkit- form is only needed for very old browsers, and is offered as an option.

Using the tool

There is no button to wait for: the CSS Box Shadow Generator result follows every change. Press Try a sample to see how it behaves.

CSS Box Shadow Generator: frequently asked questions

What order are the values in?
Horizontal offset, vertical offset, blur, spread, then colour. The word inset comes first.
Can I use several shadows?
Yes, the soft second layer option adds one. More can be added by hand with commas.
Why is my inset shadow not in the preview?
The preview does not draw inner shadows. The code is correct.
What does spread do?
It grows or shrinks the shadow before blur. The preview does not show it.
Which colour formats work?
Hex colours with three or six digits, which are turned into rgba with your opacity.
Where does my text go when I use the CSS Box Shadow Generator?
No. The CSS Box Shadow Generator works in your browser, and nothing is uploaded.
Is there a way to reuse the CSS Box Shadow Generator result?
Yes. Use the copy button on the CSS Box Shadow Generator result, or select it and copy it by hand.

Related searches for CSS Box Shadow Generator

  • CSS Box Shadow Generator online
  • free CSS Box Shadow Generator
  • CSS Box Shadow Generator online free
  • CSS Box Shadow Generator for mobile
  • CSS Box Shadow Generator without sign up
  • CSS Box Shadow Generator – Developer & Web Tools

CSS Box Shadow Generator is a free online tool on MAITBOX, in the Developer & Web Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.

More tools in Developer & Web Tools →

Search tools