Ctrl + K
HomeSVG ToolsJSX to SVG
Free Developer Tool

JSX to SVG

Transform React JSX SVG markup into standard SVG syntax.

What is JSX to SVG?

Convert SVG markup written in React JSX back into standard SVG syntax. The tool converts JSX-specific attribute names such as className and strokeWidth into their standard SVG equivalents.

How to use

  1. Paste JSX SVG markup.
  2. Convert the JSX to SVG.
  3. Review the standard SVG output.
  4. Copy the generated SVG.

Features

  • JSX to SVG conversion
  • React attribute conversion
  • className conversion
  • SVG attribute normalization
  • Browser processing

Common Use Cases

  • Exporting React icons
  • Working with static SVG files
  • Frontend development
  • SVG asset preparation
  • Migrating React components

Example

Input
<svg className="icon" strokeWidth="2" viewBox="0 0 24 24">
  <path strokeLinecap="round" d="M5 12h14" />
</svg>
Output
<svg class="icon" stroke-width="2" viewBox="0 0 24 24">
  <path stroke-linecap="round" d="M5 12h14"/>
</svg>

FAQ

Can JSX SVG attributes be converted?

Yes. JSX-specific attribute names are converted to their standard SVG equivalents.

Does it convert className to class?

Yes.

Can the output be saved as an SVG file?

Yes. The generated markup can be copied or saved as a standard SVG document.