SVG Optimizer & JSX
Clean SVG metadata, preview it and convert to JSX.
About the SVG Optimizer & JSX
SVGs exported from design tools carry editor metadata, comments and XML headers that add bytes and no pixels. This tool strips them, collapses the whitespace, shows a live preview and reports the before and after size. Switch the output to JSX and it renames class to className and converts hyphenated attributes such as stroke-width to strokeWidth for React.
Tip: The preview is drawn on a dark background with white text, so icons that use currentColor show up white. Keep currentColor in the code you copy, and the icon will then follow the text colour of wherever you place it.
SVG Optimizer & JSX is free, needs no sign-up and runs entirely in your browser, so what you paste never leaves your device.
How to use it
- Paste or type your input, or press Ctrl+V anywhere on the page.
- Adjust the options. The result updates instantly.
- Copy the output with the Copy button or Ctrl+C.
Topics
- svg
- optimize
- jsx
- react
Frequently asked questions
Is the SVG Optimizer & JSX free to use?
Yes. The SVG Optimizer & JSX is completely free, needs no account and has no usage limits.
Is my data uploaded when I use the SVG Optimizer & JSX?
No. Everything is processed locally in your browser, so what you paste never leaves your device. The last 3 snippets are kept on this device only and you can clear them with one click.
How do I use the SVG Optimizer & JSX?
Paste or type your input, or press Ctrl+V anywhere on the page. Results update instantly, then copy them with the Copy button or Ctrl+C.