Edit SVG files in your browser

SVG Editor

Change colors, size, text and layers, crop to content, or edit the code, with a live preview and undo.

Last updated: November 2026

All colors

Even in CSS

Crop

To content

Undo

Every change

Private

No sign-up

Drop SVG files here

Or paste SVG code anywhere on this page

Your files never leave this device

How to edit an SVG online

01

Open your SVG

Drop SVG files or choose them, or paste SVG code anywhere on the page.

02

Make your changes

Change colors, size, text and layers in the Edit tab, or edit the code directly. The preview follows every change.

03

Undo freely

Undo and Redo step through every change; dragging a color picker or typing counts as one step.

04

Save it

Download the SVG, save PNG or JPG at up to 8x, or copy it as a data URI, CSS, JSX or a React component.

What you can edit

  • Colors

    Every color in the SVG, however it's written (red, #f00 or rgb), changed everywhere at once. Also currentColor, and shapes that have no fill and draw black.

  • Size and viewBox

    New width and height with the shape kept, a viewBox added so it scales, or no size at all so it fits the space it's placed in.

  • Crop to content

    The viewBox set tightly around what's drawn, with padding.

  • Rotate and flip

    Turn by 90 degrees left or right, or mirror it, around its center.

  • Text

    Change the words in each text element.

  • Layers

    Every drawn element in order. Point at one to see which shape it is; hide, show or delete it.

  • Code

    A full code editor with a live preview, Format and Minify.

Change SVG colors, including the ones other tools miss

A color in an SVG can be set in three places: a fill or stroke attribute, a style attribute, or a <style> block. When CSS sets it, the CSS wins over the attribute (MDN), so tools that only change attributes leave those shapes unchanged. This editor finds a color wherever it's set and changes it everywhere, keeping its transparency.

Two more cases get their own entry. Shapes with no fill at all are drawn black; giving the SVG a default fill colors all of them at once. And icons often use currentColor, which takes the text color of the page they're placed in; you can swap it for a fixed color when the icon must look the same everywhere.

Resize and crop an SVG without losing quality

An SVG's width and height set how big it shows; its viewBox says which part of the drawing fills that space. Without a viewBox, a resized SVG doesn't scale but gets cropped or padded (W3C SVG 2). So the editor adds a viewBox before resizing, and a vector stays sharp at any size.

Crop to content draws the SVG, finds where something is actually drawn, including parts that stick out past the edges, and sets the viewBox tightly around it. A background rectangle counts as drawn, so remove or hide it first to crop to the shapes on it. Removing the width and height makes an SVG responsive: placed in a web page, it fills the width of its container and keeps its shape.

Visual edits and code, always in sync

Every change in the Edit tab is written into the code, and every change in the code shows in the Edit tab and the preview. Undo and Redo step through both. When you're done, save as SVG, PNG or JPG, or copy for your code as a data URI, CSS, JSX or a React component.

To just look at an SVG and check why it looks wrong, use the SVG Viewer. To make it smaller with every optimizer option, use the SVG Optimizer. To turn a logo or photo into an SVG first, use Image to SVG.

Safe and private

An SVG can contain scripts and links to other servers. Here they never run: the SVG is shown as an image, where browsers run no scripts and load nothing from elsewhere (MDN), and they're removed before you save. Your files are edited in your browser and never uploaded.

Why use ImgTweak?

✓Recolors colors that other editors miss
✓Crop to content and responsive in one click
✓Undo and redo for every change
✓Code and visual edits stay in sync
✓No sign-up, no watermark, no upload
✓Scripts in an SVG never run

Frequently asked questions

How do I edit an SVG file online?

Drop the SVG on the box above. The Edit tab lists its colors, size, text and layers to change, and the Code tab shows the code. Download the SVG when you're done.

How do I change the color of an SVG?

Each color in the SVG is listed in the Edit tab. Pick a new color for it, or type a hex code, and it changes everywhere it's used: in fill and stroke attributes, inline styles and <style> blocks.

Why didn't changing the fill attribute recolor my SVG?

A fill set in CSS, in a style attribute or a <style> block, wins over the fill attribute. This editor changes the color in all of those places at once.

How do I resize an SVG without losing quality?

Set a new width and height in the Size section. The SVG gets a viewBox first if it has none, so the drawing scales smoothly to the new size; as a vector it stays sharp at any size.

How do I remove empty space around an SVG?

Use Crop to content. It finds where the drawing is, sets the viewBox around it with the padding you choose, and brings back parts that were outside the edges.

How do I make an SVG responsive?

Remove width and height in the Size section. With only a viewBox, an SVG placed in a web page fills the width of its container and keeps its shape; in an <img> tag, set its width with CSS.

Can I edit the text in an SVG?

Yes, in the Text section. Text styled in parts (with tspan elements) is shown and can be edited in the Code tab.

Can I draw new shapes?

Not here: this editor changes existing SVGs. To draw from scratch, use a vector drawing app, then open the result here to fine-tune colors, size and code.

Do I need to sign up?

No. There's no account, no watermark and no limit on files. Everything runs in your browser and nothing is uploaded.

Is it safe to edit an SVG from somewhere else?

Yes. Scripts in an SVG never run here: the SVG is shown as an image, and scripts, embedded web pages and links to other servers are removed before you save it.

Edit your SVG

Drop an SVG above, or paste SVG code anywhere on the page.