Format TSX with Prettier's TypeScript parser. Preserves typed props, generics in JSX, React Server Component syntax, and full TypeScript 5.x. Browser-based.
The TSX Formatter is a Prettier-powered, browser-based tool that instantly beautifies TypeScript React (.tsx) files while preserving all type information. Using Prettier's TypeScript parser, it handles typed component props (generic interfaces), generic JSX expressions, React Server Component patterns, TypeScript 5.x features (satisfies, const type params, decorators), hooks with typed state, and JSX spread with typed attributes. All formatting runs in a Web Worker; your code never leaves the browser.
QHow is this different from the JSX Formatter?
The TSX Formatter uses Prettier's TypeScript parser, which understands TypeScript type syntax inside JSX — typed props, generic components, type assertions, and TypeScript 5.x features. The JSX Formatter uses the Babel parser and handles plain JavaScript JSX.
QDoes it support React Server Components?
Yes — async function components and 'use client' / 'use server' directives are handled as valid TSX syntax.
QIs my code sent to a server?
No. All formatting runs locally in a Web Worker. Nothing is transmitted externally.