SVG Path Editor
Drag end points and Bézier handles, edit every command and value, move, scale, rotate or flip, then simplify and shrink the path data.
Hufanya kazi kwenye kivinjari chako. Faili zako hazitoki kamwe kwenye kifaa. Tazama jinsi ya kuthibitisha
…
Jinsi ya kufanya
- 1Load a path
Paste path data into the d field, choose a shape from Shapes, or press Open .svg.
- 2Drag points
Drag blue end points and white handles on the canvas; turn on Snap to grid for exact positions.
- 3Edit commands
In Commands change values, switch a command type, insert a line after a row or delete a row.
- 4Transform
In Transform and simplify move, scale, rotate, flip or fit the path to an icon grid.
- 5Clean up
Set the decimals, press Round all values, Simplify straight runs and Optimise.
- 6Export
Open Output to copy the optimised, absolute or relative data, or download a fitted SVG file.
Kuhusu zana hii
The d attribute of an SVG path is a compact language of moves, lines, curves and arcs, and it is almost impossible to edit by reading the numbers. Icons exported from design tools often carry six decimals, redundant commands and relative and absolute coordinates mixed together. This editor shows the path on a grid with every end point and curve handle as something you can drag with a mouse or a finger. Next to the canvas, each command is a row you can retype, convert to another command type, insert or delete. Tools move, scale, rotate and flip the whole shape, fit it to a 24 or 512 unit box, simplify nearly straight runs of points and rewrite the data in its shortest form.
Who this is for
Front-end developers cleaning up icons, designers who want a precise tweak without reopening a design file, people learning how SVG paths work, and anyone making hand-written paths for CSS clip-path or offset-path.
Reading any path
The parser follows the SVG 2 grammar: all ten commands (M, L, H, V, C, S, Q, T, A, Z) in upper and lower case, repeated values without repeating the letter, numbers like `-.5e2`, and compact arc flags such as `a5 5 0 0110 0`. Errors are reported with the position, so a broken path from a file is easy to find.
Editing visually and numerically
Blue dots are end points; white squares are curve handles with dashed lines to their anchor. Dragging snaps to the grid when Snap to grid is on. The command list shows named values (x1, y1, x, y, rx, large, sweep) and you can change a command type: a line can become a cubic curve with sensible handles, or a curve can become a line, keeping the end point.
Transform, simplify, optimise
- Move, scale around the centre, rotate by degrees and flip horizontally or vertically. - Fit to 16, 24, 32, 100 or 512 units, the common icon grids. - Simplify straight runs uses the Ramer–Douglas–Peucker algorithm with your tolerance. - Optimise turns lines into H and V where possible, drops zero-length segments and writes each segment absolute or relative, whichever is shorter.
Worked example
The star example has 11 commands written with one decimal. Fit 24×24 scales it to a 24-unit icon box; Round all values with 2 decimals and Optimise reduce the data from about 90 characters to about 70, while the shape on screen does not change.
Limits
The editor works on one path at a time; when an SVG file has several paths you choose which one to edit. Stroke widths, gradients and transforms on parent groups are not applied to the data. Scaling a rotated arc by different amounts in x and y is approximate, because an ellipse under a non-uniform scale is not exactly representable with the original rotation.
Mfano uliotatuliwa
Star path fitted to 24×24, rounded to 2 decimals and optimised: same shape, about 20 fewer characters of path data.
Kwa ufupi
- Kategoria: Wasanidi na data
- Hufanya kazi kwenye kivinjari, bila usajili, bila kupakia.
- Taarifa unazoingiza hubaki kwenye kifaa chako.
- Inapatikana kwa Kiingereza.
- Maudhui yalikaguliwa mwisho:
- Chanzo rasmi: W3C SVG 2, chapter 9 Paths: path data grammar and the elliptical arc implementation notes
Maswali yanayoulizwa mara kwa mara
What is the difference between absolute and relative commands?
Uppercase commands use coordinates measured from the origin; lowercase ones are measured from the previous point. Relative data is often shorter and easier to move, absolute data is easier to read.
Will optimising change how my icon looks?
Optimise only rewrites commands and uses the decimals you set. With 2 decimals the change is far below a pixel for normal icon sizes; check the preview before replacing the original.
How does Simplify decide which points to remove?
It looks at runs of straight line segments and removes points that lie closer to the line between their neighbours than the tolerance. Curves are not touched.
Can I edit an icon from a file?
Yes. Press Open .svg; if the file has several paths, buttons let you choose which one to edit.
Does it work on a phone?
Yes, points and handles can be dragged with a finger, and the command list wraps to the screen width.
Is the SVG uploaded?
No. Files are read and edited in your browser; the current path is saved in local storage only.
