--- title: ".tsx file — what it is and how to open it" description: "A .tsx file is a TypeScript Source (JSX). TypeScript with embedded JSX markup — the standard file type for React components. How to open one on Windows, macOS and Linux, and what to convert it to." url: https://atoneplace.net/file/tsx/ site: "At One Place" --- # .tsx files **.tsx file: TypeScript Source (JSX)** TypeScript with embedded JSX markup — the standard file type for React components. ## What opens a .tsx file - **Windows:** Visual Studio Code, WebStorm, Notepad (built in) - **macOS:** Visual Studio Code, WebStorm, TextEdit (built in) - **Linux:** Visual Studio Code, Text Editor (built in), Neovim - **In a browser:** TypeScript Playground, CodeSandbox ## What a .tsx file is TypeScript is JavaScript with static types, created by Microsoft in 2012, and .tsx is the variant that also allows JSX markup inside the code, which is how React components are written. Plain TypeScript files use .ts, an extension it shares with MPEG transport stream video — if a .ts file opens as readable code it is TypeScript, and if it is binary it is video. Browsers do not run TypeScript directly; it is compiled to JavaScript first. ## Converting it A .tsx file is commonly converted to .js, .jsx, .ts or .txt. It is a plain text format, so any text editor can open and edit it directly. ## Details - **Extension:** .tsx - **Full name:** TypeScript Source (JSX) - **Category:** Code and scripts - **MIME type:** text/plain - **Created by:** Microsoft - **Format:** Plain text ## Common questions ### How do I open a .tsx file? On Windows use Visual Studio Code; on macOS use Visual Studio Code; on Linux use Visual Studio Code. TypeScript with embedded JSX markup — the standard file type for React components. ### What is a .tsx file? TypeScript Source (JSX). TypeScript is JavaScript with static types, created by Microsoft in 2012, and .tsx is the variant that also allows JSX markup inside the code, which is how React components are written. Plain TypeScript files use .ts, an extension it shares with MPEG transport stream video — if a .ts file opens as readable code it is TypeScript, and if it is binary it is video. ### Can I convert a .tsx file? Yes. It is usually converted to .js, .jsx, .ts or .txt, either by exporting from one of the programs listed above or with a format converter. ## Related pages - [.html — HyperText Markup Language](https://atoneplace.net/file/html/) - [.js — JavaScript Source](https://atoneplace.net/file/js/) - [.css — Cascading Style Sheet](https://atoneplace.net/file/css/) - [.py — Python Source](https://atoneplace.net/file/py/) - [.java — Java Source](https://atoneplace.net/file/java/) - [.cpp — C++ Source](https://atoneplace.net/file/cpp/) - [.php — PHP Source](https://atoneplace.net/file/php/) - [.c — C Source](https://atoneplace.net/file/c/) - [.cs — C# Source](https://atoneplace.net/file/cs/) - [.go — Go Source](https://atoneplace.net/file/go/) - [.rs — Rust Source](https://atoneplace.net/file/rs/) - [.rb — Ruby Source](https://atoneplace.net/file/rb/) ## Sources - Media Types Registry — IANA (https://www.iana.org/assignments/media-types/) - Official vendor product documentation — At One Place (/about/)