> [Site index](https://perfectvector.com/llms.txt) — available pages and descriptions.

# SVG Gaussian Blur: Set Horizontal and Vertical Blur

> Control horizontal and vertical SVG blur with feGaussianBlur stdDeviation. Reproduce the effect with three values and check which edge it changes.

Source: https://perfectvector.com/blog/svg-gaussian-blur-stddeviation

Language: en
Author: Irene Kim
Published: 2026-11-26T08:00:00+09:00

Use two numbers on SVG's `feGaussianBlur` to control the two axes. The first `stdDeviation` value controls horizontal blur and the second controls vertical blur. Use `stdDeviation="8 0"` for horizontal blur only, `stdDeviation="0 8"` for vertical blur only, or `stdDeviation="8"` to apply 8 on both axes. [Filter Effects Level 1](https://www.w3.org/TR/filter-effects-1/#feGaussianBlurElement)

## Choose the axis you want to soften

**Standard deviation** is the width parameter of the Gaussian used along each axis. The numbers are measured in the filter primitive's coordinate system. This example sets `primitiveUnits="userSpaceOnUse"`, so the values use the SVG's user units. A value of 8 gives a stronger spread than 2 on the same axis, with the object and coordinate system held fixed. [SVG 1.1 Gaussian blur](https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement)

| Attribute            | Visible effect on a filled rectangle                                        |
| -------------------- | --------------------------------------------------------------------------- |
| `stdDeviation="8 0"` | Paint spreads past the left and right edges. The top and bottom stay sharp. |
| `stdDeviation="0 8"` | Paint spreads past the top and bottom edges. The sides stay sharp.          |
| `stdDeviation="8"`   | Paint spreads past all four edges.                                          |

When checking a directional blur, start at the middle of an edge, away from the corners. The left and right edges are vertical lines, so horizontal spread softens them.

## Run the same rectangle three ways

Save this SVG and open it in a renderer that supports SVG filters. Change the `stdDeviation` value to `0 8` and then to `8`. Keep the rectangle and filter region fixed.

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120"
     viewBox="0 0 120 120">
  <defs>
    <filter id="blur" x="0" y="0" width="120" height="120"
            filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
      <feGaussianBlur in="SourceGraphic" stdDeviation="8 0"/>
    </filter>
  </defs>
  <rect x="40" y="40" width="40" height="40" fill="#176e65"
        filter="url(#blur)"/>
</svg>
```

In our 120 × 120 resvg 0.47.0 render, the horizontal version had nonzero alpha at (35, 60), five units left of the rectangle, and zero at (60, 35), five units above it. The vertical version reversed those results. The single-value version had nonzero alpha at both sample points.

![Three equal SVG rectangles with horizontal-only, vertical-only, and two-axis Gaussian blur](https://perfectvector.com/blog/svg-gaussian-blur-stddeviation/workflow-proof.webp)

*The same rectangle rendered with 8 0, 0 8, and 8. Compare the centers of the side and top edges to see which axis changes.*

## Separate a wrong axis from a clipped blur

A sharp line at the outer edge of an otherwise soft blur can come from the filter region. Temporarily give the filter more room while keeping the primitive units and `stdDeviation` unchanged. If the missing paint returns, [inspect the SVG filter region and viewport](https://perfectvector.com/blog/svg-shadow-clipped). If the paint still spreads along the wrong axis, check the order of the two values and any transform applied to the object. The SVG coordinate system follows the applicable transforms. [SVG 2 coordinate systems](https://www.w3.org/TR/SVG2/coords.html#TransformProperty)

Blur changes the rendered paint. If the outline also looks soft with the filter removed, inspect the original shape or embedded bitmap before adjusting the filter. The [SVG lighting guide](https://perfectvector.com/blog/svg-lighting-relief) shows another use of blur to soften the edge of an effect.

## FAQ

### Does a single stdDeviation value apply to both axes?

Yes. A single value supplies the standard deviation for both horizontal and vertical blur. For example, 8 has the same meaning as 8 8.

### Can I blur along just one axis?

Yes. Give the other axis a value of zero. Use 8 0 to spread paint horizontally or 0 8 to spread it vertically.

### What does stdDeviation="0 0" do?

Both axes have zero spread, so the primitive passes through its input image without Gaussian blur.

## Start with source artwork you can edit

PerfectVector can recover editable SVG paths from flat raster artwork when you only have a PNG or JPG. If you need a clean outline to blur in SVG, [convert the source image to vector](https://perfectvector.com/image-to-vector), inspect its paths with the filter off, then apply the blur to the outline you want to soften.

## Sources

1. [W3C Filter Effects Level 1, feGaussianBlur](https://www.w3.org/TR/filter-effects-1/#feGaussianBlurElement) — Defines axis order and the one-value shorthand.
2. [W3C SVG 1.1, Gaussian blur and coordinate units](https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement) — Specifies the units and behavior of Gaussian blur.
3. [W3C SVG 2, coordinate systems and transforms](https://www.w3.org/TR/SVG2/coords.html#TransformProperty) — Explains how transforms establish SVG user space.

## Explore

- [Read the HTML article](https://perfectvector.com/blog/svg-gaussian-blur-stddeviation)
- [Place an SVG Filter Offset With Signed dx and dy](https://perfectvector.com/blog/svg-feoffset-dx-dy.md)
- [SVG Displacement Maps: Distort Your Logo Preview](https://perfectvector.com/blog/svg-fedisplacementmap-artwork.md)
- [Product facts](https://perfectvector.com/product-facts.md)
- [FAQ](https://perfectvector.com/faq.md)
- [Pricing and credits](https://perfectvector.com/pricing.md)
