CSS Filter Generator

Stack filter functions on a photo, compare before and after, paste an existing filter to edit it, and copy the CSS or save the filtered image.

Berjalan dalam pelayar anda. Fail anda tidak pernah meninggalkan peranti. Lihat cara menyemaknya

…

Cara melakukannya

  1. 1
    Open an image

    Tap Open image to choose a photo or graphic, or keep the built-in sample.

  2. 2
    Start from a preset

    Tap a preset such as Black and white or Warm vintage, or start from an empty list.

  3. 3
    Add and adjust steps

    Choose filters from Add a filter, then move each slider and switch steps on or off.

  4. 4
    Reorder and compare

    Use the arrows to change the order and drag the split slider to compare before and after.

  5. 5
    Add a hover state

    Turn on the hover state, edit the Hover tab and set the transition time.

  6. 6
    Copy or save

    Copy the CSS or the SVG filter, or save the filtered image as PNG or JPG.

Tentang alat ini

The CSS filter property can turn an image grey, warm it like an old print, blur it behind a dialog, shift every colour around the wheel or add a shadow that follows the shape of a transparent PNG, all without editing the file. Getting the numbers right is the hard part, because each function changes the result of the one before it. This generator lets you build the chain on your own picture. Open any image from your device, or use the built-in sample, then add functions from the list: blur, brightness, contrast, grayscale, hue-rotate, invert, opacity, saturate, sepia and drop-shadow. Each step has its own slider, an on and off switch, and up and down arrows, because order matters: sepia followed by hue-rotate gives a different tint from hue-rotate followed by sepia. A split view shows the original on the left and the filtered image on the right; drag the split slider to compare any part. Eleven presets, such as warm vintage, cool fade, black and white, vivid, old photo and a disabled look for interface elements, give you a starting point. If you already have a filter value from a stylesheet, paste it in, and the tool reads every function, converts turn, rad and grad angles and decimal amounts such as sepia(.5), and loads them into the editor.

Hover states

Turn on Add a hover state to give the image a second filter chain for when the pointer is over it, with a transition time. A common pattern is a grayscale gallery that comes into colour on hover. Switch between the Normal and Hover tabs to edit each chain; the CSS output contains both rules and the transition.

Saving the filtered image

Save PNG or Save JPG draws your image on a canvas with the same filter, at full resolution, and downloads it. Where the browser's canvas does not support filters, the colour functions are applied with the matrices from the Filter Effects specification, so the colours still match the preview; only blur and drop shadow need native support and you are told if they are skipped.

SVG output

The SVG tab turns all the colour steps into feColorMatrix primitives inside one SVG filter element. That is useful where a list of CSS functions cannot be used, such as some email clients, older SVG tools or a backdrop you control with filter: url(#f1).

Limits

CSS filters change how the image is drawn, not the file on your server, so visitors still download the original. They are not a replacement for photo editing: there are no curves, masks, local adjustments or noise reduction. Very large photos above about 30 megapixels may fail to save on phones because of canvas memory limits. The image stays on your device and is not stored with the project.

Contoh berselesaian

The Warm vintage preset produces filter: sepia(45%) contrast(110%) brightness(105%) saturate(120%). On the sample image, a sky pixel of rgb(56, 189, 248) becomes about rgb(122, 209, 227), softer and warmer, and the deep blue rgb(30, 58, 138) becomes about rgb(46, 62, 112). Adding a hover state with the same steps turned off gives a photo that returns to its real colours when the pointer rests on it.

Ringkasnya

Soalan lazim

Does the order of filters matter?

Yes. Each function works on the output of the previous one. Brightness before contrast is different from contrast before brightness, and sepia before hue-rotate gives another tint than the reverse. Use the arrows to reorder and watch the preview.

What is the difference between drop-shadow and box-shadow?

box-shadow draws a shadow around the element's rectangle. The drop-shadow filter follows the visible pixels, so a transparent PNG or SVG icon gets a shadow in its own shape. drop-shadow cannot have spread or inset.

Can I edit a filter I already use?

Yes. Paste the value, with or without filter:, into Paste an existing filter and tap Load into the editor. Every supported function becomes an editable step; anything the tool cannot read, such as url() references, is listed.

Do filters slow down a page?

Colour functions are cheap. Large blur values and drop shadows on big or animated elements cost more, especially on phones. Keep blur small, avoid animating filters on many elements at once, and test on a real device.

Is the saved image exactly like the preview?

It uses the same filter on a canvas at the image's full size. Colours match; very large blur values can look slightly different at full resolution because the preview is scaled down.

Is my photo uploaded?

No. The image is opened from your device into this page and never sent anywhere. Only the filter settings are saved in your browser; the image is not.

Percuma sepenuhnyaTiada bayaran, tiada pendaftaran
Fail kekal peribadiSemuanya berjalan dalam pelayar anda
Mudah dalam bahasa andaTersedia dalam banyak bahasa