DEVtoy
Language · English

SVG to React Component

Turn SVG markup into a named React component with JSX attributes and props. Review the generated component before use.

How to use

  1. Paste your input or load the example below.
  2. Adjust the options, then select “Create component”.
  3. Review the result, then copy or download it.

No uploads. No account. Processing stays in your browser.

Example input
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="icon"><path d="M20 6 9 17l-5-5"/></svg>

Related tools