SVG Path Data Minifier & Optimizer

Reduce noisy SVG path data, compact coordinates, and generate smaller inline SVG output.

SVG & CSS Engineering Local processing SVG data is processed locally.

Minifier

Zero-length segments may affect markers or stroke caps. Enable this option only when you know they are safe to remove.

Results

Paste SVG markup or path data and optimize it.

Metrics

    Introduction

    Design tools often export SVG paths with excessive decimal precision, redundant line commands, and unnecessary whitespace. This increases markup size without improving visual quality.

    This minifier cleans path data locally and produces a more compact SVG output.

    How it works

    The tool parses SVG path commands, rounds coordinates to the selected precision, converts simple line commands into horizontal or vertical commands where possible, and serializes the result with compact formatting.

    • Full SVG markup is processed with DOMParser.
    • Raw path data is accepted directly.
    • Zero-length segment removal is optional.
    • All processing happens locally.

    How to use

    1. Paste full SVG markup or path data.
    2. Select coordinate precision.
    3. Optionally remove zero-length segments.
    4. Click Optimize SVG.
    5. Copy the optimized output.

    Practical example

    A path exported as M 10.000000 10.000000 L 50.000000 10.000000 L 50.000000 50.000000 can often be reduced to M10 10H50V50.

    Use cases

    • Cleaning icon exports.
    • Reducing inline SVG size in HTML.
    • Preparing design-system assets.
    • Optimizing UI illustrations.
    • Reviewing SVG output before committing code.

    Best practices

    • Use the lowest precision that preserves visual quality.
    • Check icons at small sizes after rounding.
    • Keep zero-length segments if they are intentional.
    • Compare optimized output visually before deployment.
    • Use SVG sprites where many icons repeat.

    Common mistakes

    • Rounding too aggressively and distorting curves.
    • Removing zero-length segments used for markers.
    • Optimizing only one icon variant without checking others.
    • Assuming all design-tool exports are already optimized.
    • Forgetting to test dark-mode stroke visibility.

    Limitations

    • Rounding can slightly alter rendering.
    • Complex arc paths may require manual review.
    • The tool does not optimize filters, gradients, or groups.
    • Path simplification does not remove redundant points from curves.

    Browser compatibility

    The optimized path syntax is standard SVG path syntax and works in current versions of major browsers.

    FAQ

    Is my SVG uploaded?

    No. SVG markup and path data are processed locally in your browser.

    Will optimization change the visual result?

    Small rounding changes can occur. Use a precision level that preserves visual quality and verify the output.

    Can I paste only a `d` attribute?

    Yes. The tool accepts raw path data as well as full SVG markup.

    Does it optimize filters or groups?

    No. This tool focuses on path data. Filters, gradients, symbols, and groups are not optimized.

    References

    Version and changelog

    • Version: 1.0.0
    • Last updated: August 8, 2026
    • Changelog: Initial production release.