.jsx

What is a .jsx file?

JSX is a JavaScript file containing HTML-like syntax — the standard way to define React components.

Use caution
Type Code
By Meta (Facebook)
MIME text/jsx

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

You're looking at a .jsx file — JavaScript with HTML mixed in. That sounds illegal, and it felt that way when Facebook introduced it in 2013 with React. JSX lets you write UI components that combine markup and logic in a single file, using an XML-like syntax that compiles to regular JavaScript function calls.

JSX is not valid JavaScript — browsers can't run it directly. A build tool (Babel, esbuild, or Vite) transforms `<Button onClick={handleClick}>Save</Button>` into `React.createElement('Button', { onClick: handleClick }, 'Save')` before the browser sees it. This compilation step is why React projects need a build pipeline. JSX is technically framework-agnostic, but in practice, seeing .jsx means React.

VS Code provides excellent JSX support — syntax highlighting, IntelliSense, auto-imports, and error checking. Any text editor can open the file since it's plain text. For type safety, TypeScript's .tsx extension is the modern standard. If you're starting a new React project, consider TSX from the beginning — retrofitting types onto JSX is more painful than starting with them.

Technical details
Full Name
JavaScript JSX
MIME Type
text/jsx
Developer
Meta (Facebook)
Magic Bytes
N/A
Safety
.jsx requires caution. Source code files can execute arbitrary code. Only run code from trusted sources.
What opens it
VS Code
FREE All
Any text editor
FREE All
FAQ
What's the difference between .jsx and .tsx?
JSX is JavaScript with HTML-like syntax. TSX is the same thing but with TypeScript — adding static types for better error checking and IDE support. TSX is recommended for any project larger than a toy.
Can browsers run JSX directly?
No. JSX must be compiled to regular JavaScript by a build tool (Babel, esbuild, Vite, SWC) before browsers can execute it. The build step transforms JSX syntax into standard function calls.
Related formats