JSX Formatter
Format React components and JSX so props, nesting and hooks line up.
Format React components and JSX so props, nesting and hooks line up.
Paste a React component, choose JavaScript (or TypeScript for .tsx) and click Beautify. The code is re-indented with consistent spacing so nested JSX, props and hooks are easy to read. It only changes whitespace and line breaks, so the component behaves exactly the same.
No. React components are written in JSX, so formatting a React file is formatting JSX.
No. Only whitespace and line breaks change.
Yes. Choose TypeScript in the menu.