CSS Opacity Filter Generator
CSS provides two ways to make an element semi transparent: the standalone opacity property and the filter: opacity() function inside the filter property.
1. opacity()
.image {
filter: opacity(0.6);
}

Functions run top to bottom, in the order written. Your image stays in your browser; it is not uploaded.
filter: opacity() from 0 to 1 with a live preview
Original and filtered previews side by side
Combine opacity() with other filter functions in one rule
Try it on your own image; nothing is uploaded
- Cost
- Free tier
- Sign-up
- Not required
- Processing
- Tool-specific
- Privacy
- Clearly disclosed
Add this Filter Effects Builder to your website
Drop the Filter Effects Builder into a blog post, product docs, intranet, or school portal with one iframe. Processing, privacy, and usage limits are the same as on the full tool page.
- One copy-ready line of HTML
- Responsive — adapts to any container width
- No API credentials are placed in the snippet
Embed code
<iframe
src="https://www.fixtools.io/css-tool/filter-effects-builder?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="Filter Effects Builder by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
filter: opacity() vs CSS opacity: Stacking Contexts, Compositing, and When Each Applies
The CSS opacity property and the filter: opacity() function produce identical visual transparency when used alone at matching numeric values. opacity: 0.5 on an element renders it at 50 percent transparency, and filter: opacity(0.5) on the same element renders identically pixel for pixel. The W3C Filter Effects specification defines filter: opacity() as implementing the same algorithm as the opacity property, with no permitted deviation in output. The meaningful differences emerge in other aspects of how each is processed by the browser. The opacity property always creates a new stacking context whenever the value is less than 1, which means positioned child elements with z-index values cannot overlap elements outside the parent stacking context boundary. The filter property also creates a stacking context, but this context is created by any non none filter value, not specifically by opacity(), so even filter: brightness(1) on a static element introduces the same containment rule.
When combining transparency with other filter functions, filter: opacity() is the correct choice because it participates in the filter chain as a sequential step. Writing filter: brightness(0.8) opacity(0.7) applies brightness first, then reduces opacity on the brightness adjusted output, giving a predictable and documented processing order. Using the separate opacity property alongside a filter property on the same element produces two separate effects processed at different stages of the rendering pipeline. The results are visually close but not identical in all rendering contexts, and separating them into two properties reduces maintainability because the transparency is no longer visible as part of the filter stack when a future maintainer scans the rule. Keeping related visual adjustments in one property makes the intent self documenting and reduces the surface area for accidental conflicts when the rule is later updated.
GPU compositing implications differ between the two approaches in ways that matter for animations on long lists, modals, or page wide overlays. The opacity property on its own can be promoted to a separate GPU compositing layer if it is animated, enabling GPU accelerated transitions without triggering layout or paint on each frame. filter: opacity() requires the element to be processed through the full filter pipeline on every frame, which is more expensive than the simple alpha blending used by the standalone opacity property. For animated transparency effects where no other filter functions are involved, animating the opacity property is more efficient and produces smoother frame timing than animating filter: opacity(). Reserve filter: opacity() for cases where opacity is one component in a multi function filter chain, or where stacking with other filter functions in a defined order is the explicit design intent.
Choosing between the two also affects how transparency interacts with accessibility tooling and pointer event handling. Both approaches leave the element fully present in the DOM, focusable by keyboard, and readable by screen readers, regardless of how transparent the visual rendering becomes. An opacity: 0 element still receives clicks, captures focus, and announces its content to assistive technology unless additional properties like pointer-events: none and aria-hidden="true" are added. This catches developers who expect opacity: 0 to act like display: none, and it explains why some fade out animations leave invisible click targets behind on the page. Plan the full hide pattern by combining opacity transitions with a class that also sets pointer-events: none and aria-hidden when the visual fade reaches zero, so the element fully retreats from both visual and assistive surfaces at the same time.
How to use this tool
The tool starts with opacity(0.6) on a sample illustration. Drag the slider toward 0 to make the element more transparent. If opacity is the only effect you need, the opacity property does the same job; use filter: opacity() when you combine it with other filter functions. Copy the rule when it looks right.
How It Works
Step-by-step guide to css opacity filter generator:
- 1
Choose filter: opacity() or the opacity property
For a fade on its own, the opacity property is the usual choice. filter: opacity() is useful when the element already has a filter and you want the fade in the same declaration and order as the other functions.
- 2
Set the opacity value
Drag the slider or type a value from 0 (invisible) to 1 (unchanged). The filtered preview shows the result against the light preview background.
- 3
Add other functions if needed
Add blur(), grayscale() or other functions from the list. They run top to bottom, in the same order as in the copied CSS.
- 4
Copy the CSS
Click Copy CSS. The output is a complete rule you can paste into your stylesheet; rename the .image selector to match your element.
Real-world examples
Common situations where this approach makes a real difference:
Tooltip fade-in using opacity property
A developer builds a tooltip component that fades in over 0.15s on :hover. They use opacity: 0 at rest and opacity: 1 on hover with transition: opacity 0.15s ease. The opacity property is preferred over filter: opacity() here because it can be GPU-composited without filter pipeline cost, and no other filter effects are needed on the tooltip.
Disabled image with blur and transparency combined
A developer needs disabled image tiles to appear both slightly blurred and semi-transparent. They apply filter: blur(1.5px) opacity(0.55) to the disabled state. Using filter: opacity() keeps the blur and transparency in a single filter declaration that processes them in order, making the disabled state self-contained and easy to override in a modifier class.
Investigating a z-index bug caused by opacity
A dropdown menu disappears behind a sibling card component despite having a high z-index. The developer inspects the card and finds opacity: 0.99 was added as a GPU promotion hack. This created a stacking context that confined the dropdown z-index within the card container. Removing the opacity property from the card resolves the stacking context boundary and the dropdown renders correctly above the card.
Overlay panel with backdrop blur and transparency
A side panel overlay uses backdrop-filter: blur(10px) for a frosted glass background and filter: opacity(0.95) on the panel itself to keep it slightly transparent. Both effects are intentional and work independently. The developer documents the distinction between backdrop-filter (blurs what is behind the panel) and filter: opacity() (dims the panel content itself) in a code comment to prevent future confusion.
Pro tips
Get better results with these expert suggestions:
Avoid mixing opacity property and filter: opacity() on the same element
Setting both opacity: 0.8 and filter: opacity(0.8) on the same element does not produce opacity(0.64), though some might expect multiplication. The rendering pipeline processes them at different stages. For predictable results, use one approach per element. If filter is already applied, add opacity() to the filter chain rather than adding a separate opacity property.
CSS opacity property is sufficient for most UI transparency needs
For tooltips, modals, overlay panels, disabled states, and hover fades that only involve transparency, the opacity property is simpler, better performing when animated, and more widely understood. The filter: opacity() function is specifically valuable when transparency needs to be processed within a multi-function filter chain where order matters.
Validate GPU layer usage when applying opacity to many elements
Chrome DevTools Layers panel shows GPU compositing layers. An element that will animate its opacity property gets promoted to a separate layer, which costs GPU memory. If a grid of 50 card elements all animate their opacity simultaneously, 50 separate GPU layers may be created. Limiting the number of simultaneously animated opacity elements prevents GPU memory pressure.
Use visibility: hidden as an alternative to opacity: 0 for accessibility
An element with opacity: 0 or filter: opacity(0) is fully transparent but still occupies space in the layout, is reachable by keyboard focus, and is readable by screen readers. If you want to visually hide an element and remove it from the accessibility tree simultaneously, use visibility: hidden. For a fade-out that removes screen reader access, combine opacity: 0 with pointer-events: none and aria-hidden: true.
Use opacity property for standalone transparency animation
When animating only transparency with no other filter functions, use the CSS opacity property, not filter: opacity(). The opacity property can run on the GPU compositor thread without triggering paint, making it more efficient for transitions on frequently animating elements like modals and tooltips.
Use filter: opacity() when combining with other filter functions
If an element needs both transparency and another filter effect such as blur or brightness, combine them in a single filter declaration: filter: blur(2px) opacity(0.8). Keeping related effects in one filter property makes the intent clear and ensures they are processed in a defined order.
Check stacking context when opacity creates z-index bugs
Both opacity and filter create stacking contexts. If a child element with a high z-index appears behind another element unexpectedly, check whether any ancestor has opacity less than 1 or a non-none filter value. These create the stacking context boundaries that limit z-index effectiveness.
Frequently asked questions
Related guides
More use-case guides for the same tool:
Related tools
Other tools you might find useful:
Ready to get started?
Open Filter Effects Builder to review its free limits and processing method.
Open Filter Effects Builder →Free tier · No account needed · Transparent limits