vasilenko.info

CSS filter generator

/en/tool/css-filter-generator/ works calculated in the browser

The sliders and presets are on the left; the image and filter string are on the right. The filter string stays in view while you adjust the settings, so you don't need to scroll back up for the result. Drop your own file directly onto the image; it stays in your browser. You can download the finished image below as a file.

promoTwenty years of notes on websitesHow we did it in 2008 and what still works today.Open

Filter settings

Settings on the left, image and ready-to-copy string on the right. They stay in view while you move the sliders. Default values make no changes and aren't included in the string. The preview uses exactly what you copy.

What we're configuring
Sample

Images with shading and shadows: filters lie on a flat fill.

Drag a file here or click to choose one

Your browser reads the file locally. Not a single byte is sent to the server.

JPEG, PNG, WebP, GIF, or SVG up to 15 MB.

Background behind image

Transparency and the outline shadow are shown accurately only on a checkerboard.

Comparison

In wipe mode, the original image is on the left of the boundary and the filtered image is on the right; move the boundary with the slider below the preview.

Presets

The thumbnail is the same image shown in the preview, already processed with this preset.

Order in the string

    The browser applies filters from left to right, so order is part of the configuration. Drag a chip with the mouse, or focus it and use the left and right arrow keys.

    Output format

    The string on the right updates immediately—you can switch formats after choosing the filters.

    The browser does the work. The image is read through FileReader and exists only in this tab: after the page loads, there are no network requests at all—this is visible in the developer tools. The settings are added to the end of the URL, so you can share a link to the configured preset. The image itself is not included in the link.

    Result

    Sample with filters

    filter Ready-to-use CSS
    filter: none;
    Image file

    Image file

    The browser draws the same image on canvas with the same filter string and returns the file as a link from the tab's memory. Not a single byte is sent anywhere.

    File format

    PNG preserves transparency and compresses without loss, so it has no quality slider. JPEG does not support transparency and puts white behind it.

    promoCalculate ROI at the same timeCampaign payback based on spend and revenue.Open

    How to use it

    1. Choose a sample similar to your task, or drop your own file directly onto the image. The same values look different on a landscape, skin, and an interface screenshot.

    2. Adjust the sliders in the left column and watch the result on the right: the image and the filter string stay in view while you scroll through the settings. Start with contrast and saturation—they change the image the most. Set blur last: once it is applied, you can't see what the other controls do.

    3. Turn on the comparison slider when the result seems “good enough.” About half the settings are usually unnecessary, and you can see that only when the result is next to the original.

    4. Reorder the filters in the string if the result doesn't match your expectations: the browser applies them from left to right, and blur(4px) grayscale(1) is not equal to grayscale(1) blur(4px).

    5. Check transparency and drop-shadow against a checkerboard. On a white background, a semitransparent image simply looks lighter, and an outline shadow simply looks blurred.

    6. Copy the code with the button next to the string. Use the “Copy link” button for a link with all the values, and download the generated image below in the “Image file” section.

    promoBrowser task listNo account required—everything is stored on your device.Open

    The formula and what it includes

    filter: blur(px) brightness(%) contrast(%) drop-shadow(x y radius color) grayscale(%) hue-rotate(deg) invert(%) opacity(%) saturate(%) sepia(%)

    Filters are applied one at a time, from left to right: each filter works with the previous filter's result. The order in the string is part of the setting, not just formatting. backdrop-filter uses the same list, but it processes what is BEHIND the element.

    Example breakdown: why drop-shadow comes last

    The input data is the same as the default field values: you can calculate it mentally and confirm that the tool is telling the truth.

    1. Brightness, contrast, and saturation remain at 100%, and hue remains at 0deg. These are neutral values: they change nothing and are omitted from the string.

    2. Two filters plus a shadow are enabled, so they make up the rule: blur(2px) grayscale(100%) drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.45)).

    3. The shadow comes last for a reason. drop-shadow builds its silhouette from what remains of the image after the preceding filters. Put it first, and the shadow will follow the sharp outline while the image itself becomes blurred: the silhouette and the subject will no longer match.

    filter: blur(2px) grayscale(100%) drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.45));

    Frequently asked questions

    promoAll toolsForty-four tools, all running in your browser.Open

    Related tools

    5