.jsx File Extension

Learn what a .jsx file is, how to open and transform JSX source, how Poly supports it, and when .js or .tsx is a better choice.

File extension details for .jsx

Full Support
File typeJavaScript with JSX source
MIME typeNone registered
EncodingUnicode source text, normally UTF-8
Operating systemsWindows, macOS, Linux, ChromeOS
Opens withVisual Studio Code, WebStorm, Sublime Text, Babel
Poly supportYes. Poly recognizes .jsx files as readable source code.
Indexed by PolyYes. Poly indexes readable source for exact and semantic search.
Preview in PolyYes. .jsx files open in Poly's read-only code editor.
Poly agentYes. The Poly agent can read and reason about the source without executing it.

What kind of file is a .jsx?

A .jsx file contains JavaScript source with JSX, an XML-like syntax extension commonly used to describe user interfaces. JSX looks like HTML, but it follows different rules and can embed JavaScript expressions. React popularized JSX, although the syntax and React are separate and other libraries can use it too.1

There is no magic byte sequence that identifies JSX. It is Unicode text, and a reliable check requires a JSX-aware parser plus the surrounding project configuration. .jsx also has no dedicated IANA-registered MIME type. The registered text/javascript type lists .js and .mjs, not .jsx.2

Renaming Component.js to Component.jsx does not add JSX or transform the source. Likewise, renaming .jsx to .js does not compile JSX for a browser or runtime.

How do I open a .jsx on my computer?

Open .jsx files on Windows, macOS, Linux, or ChromeOS with a code editor such as Visual Studio Code, WebStorm, or Sublime Text. Visual Studio Code provides a distinct JavaScript JSX language mode, which enables appropriate syntax highlighting and editing features.3

To run a project, use the toolchain declared by its package files and documentation. Browsers and ordinary JavaScript runtimes generally need JSX transformed first. Babel's JSX transform can produce JavaScript using either an automatic runtime or a configurable classic factory.4

Do not run an unfamiliar .jsx project merely to inspect it. Source code, build plugins, package scripts, and imported dependencies can access whatever the runtime permits.

Poly support for .jsx

Poly opens .jsx source in a read-only code editor with syntax highlighting, word wrap, and in-file search. Readable source is available to exact and semantic search, and the Poly agent can summarize components, explain props and state, or reason about the code.

Poly does not execute the file, install dependencies, run its build, or automatically resolve imports. Preview is useful for inspection, but it is not a security verdict and cannot establish the behavior of an entire application from one file.

History of .jsx

JSX became closely associated with React, which was open-sourced by Facebook on May 29, 2013.5 The .jsx suffix developed as a practical signal that a JavaScript file needs a JSX-aware parser or transform. It remains a convention rather than a separate standardized programming language or media type.

The convention now extends beyond React. TypeScript describes JSX as implementation-specific and notes that its preserve mode emits unchanged JSX with a .jsx output suffix.6 Different toolchains can therefore assign different runtime meanings to the same JSX elements.

Working with .jsx and alternatives

Choose the suffix that matches both the source syntax and the project's configured tools:

ExtensionBest fitKey distinction
.jsxJavaScript source containing JSXClearly signals that JSX parsing is required
.jsStandard JavaScript, or JSX where the toolchain permits itThe suffix alone does not signal JSX
.tsxTypeScript source containing JSXAdds TypeScript syntax and type checking

React's TypeScript guidance requires .tsx for files that combine TypeScript and JSX.7 Converting .jsx to .tsx usually requires adding or fixing types, not simply changing the filename. Transforming JSX with Babel or another compiler produces JavaScript output, while renaming leaves the source unchanged.

Keep build configuration, dependency manifests, and lockfiles with shared JSX source. They identify the JSX runtime, transform settings, module system, and package versions needed to interpret the code correctly.

Footnotes

  1. React. Writing Markup with JSX.
  2. Internet Assigned Numbers Authority. text/javascript Media Type Registration.
  3. Visual Studio Code. Language Identifiers.
  4. Babel. @babel/plugin-transform-react-jsx.
  5. React. React Versions: Initial Commit.
  6. TypeScript. JSX.
  7. React. Using TypeScript.
© Poly Corp. 2026