Chưa có bản tiếng Việt nên hiển thị bằng tiếng Anh.

How to open a .tsx file online: run it in your browser

Quick answer

To open a TSX file online, open Convika's free React viewer in your browser, click Open file, and choose the .tsx file. The React component in it runs on the page, with its buttons working, on Windows, a Mac, an iPhone, or an Android phone, with no install, no build, and no signup. A .tsx file is a React component written in TypeScript, which a browser shows as code until it is compiled. The viewer strips the TypeScript and compiles the JSX in your browser, then gives you one .html file to download or a link to send.

Get a link for my app

Pro starts with a free trial: 7 days free, then $12 a month. Cancel any time before the trial ends.

On this page

To open a TSX file online, open Convika's free React viewer in your browser, click Open file, and choose the .tsx file. The React component in the file runs on the page, with its buttons, inputs, and charts working. You install nothing and build nothing, and it works in Chrome, Edge, and Safari on a computer or a phone.

A .tsx file is a React component written in TypeScript. React's documentation says: "Every file containing JSX must use the .tsx file extension. This is a TypeScript-specific extension that tells TypeScript that this file contains JSX." A browser runs JavaScript, so a .tsx file opened on its own shows its code. The React viewer strips the TypeScript types and compiles the JSX in your browser, and the file opens as the app.

A .jsx file opens the same way. For one Claude made, see how to open a JSX file from Claude.

Open a TSX file online in 3 steps

1. Open the React viewer

Go to convika.com/tools/react-viewer. It's free and needs no account.

2. Click "Open file" and choose the .tsx file

Click Open file, then Choose a .jsx or .tsx file, and pick the file. On a computer you can also drop the file on the box. The viewer opens .tsx, .jsx, .ts, and .js files up to 2 MB. The file opens on the page and is not uploaded: your browser compiles it on your device.

3. Use the app, then keep it

The app runs in a frame on the page. Click its buttons and type in its fields. Then keep it in one of 2 ways:

  • Download as .html saves the app as one HTML file that opens in any browser that is online.
  • Get a link by uploading this app gives you a private link that works for 3 minutes, with no signup.

Only the code, with no file? Click Paste code, paste it, and click Run the code.

The TypeScript the React viewer runs

We ran it on November 22, 2026, in Playwright's Chromium 156 at 1280 × 900 and in its WebKit 27.2 at an iPhone 15's size. The file, BudgetTracker.tsx, is one component that uses this TypeScript:

In the .tsx fileExample from the test fileRan
A type aliastype Category = "Food" | "Rent" | "Fun";Yes
An interfaceinterface Expense { id: number; label: string }Yes
An enumenum Currency { USD = "$" }Yes
A generic functionfunction sum<T extends { amount: number }>(items: T[]): numberYes
Typed hooksuseState<Expense[]>(START), useMemo<number>(...)Yes
A typed returnfunction BudgetTracker(): JSX.ElementYes
satisfies and as{ ... } satisfies Expense, next as ExpenseYes
An npm importimport { Plus } from "lucide-react";Yes
Tailwind classesclassName="text-2xl font-bold text-blue-600"Yes

Chosen with Open file, the budget tracker ran in both browsers. The heading took its Tailwind colour, the icon from lucide-react drew in the button, and one click on Add coffee added a third row and moved the total from $942.00 to $950.00. Download as .html saved a 16 KB BudgetTracker.html, which ran the same when opened from disk. Opened as an address in the browser, the .tsx file itself showed its code as text, starting with import { useMemo, useState } from "react";.

The viewer strips the types and runs the code. It leaves type checking to your editor, so a file opens the moment you choose it.

The libraries a .tsx file can import

The viewer loads what the code imports by name:

  • React 18 with its hooks, such as useState, useEffect, useMemo, and useReducer
  • Tailwind classes, with shadcn/ui's colours such as bg-primary
  • lucide-react icons and recharts charts
  • shadcn/ui's @/components/ui files: Card, Button, Input, Tabs, Select, Slider, Switch, Dialog, and more
  • Other npm packages by name, such as framer-motion, d3, or lodash

The component the viewer draws is the one the file exports with export default, or a top-level App.

How to open a .tsx file on Windows or a Mac

  1. Open convika.com/tools/react-viewer in Edge, Chrome, or Safari.
  2. Click Open file, then drag the .tsx file from your Downloads folder or the Finder onto the box.
  3. The app runs. Switch Width to Phone to see it at a phone's size, and click Download as .html to keep a file that opens with a double-click.

A double-click on the .tsx file itself opens it in the app your computer has set for that file type, which shows the code. On a Mac, Apple's guide gives the way to choose that app: "Control-click the file, choose Open With, then choose an app." On Windows, Microsoft's steps are Settings, then Apps > Default apps, then "type the file extension or protocol you wish to change".

How to open a .tsx file on an iPhone or an Android phone

  1. Save the file to your phone. On an iPhone, a download is in the Files app: Apple's steps are "Tap Browse", then "Tap the Downloads folder to see your downloaded files". On Android, Google's Chrome help says: "To find all the files that you've downloaded to your device, open the Files app."
  2. Open convika.com/tools/react-viewer in Safari or Chrome.
  3. Tap Open file, then Choose a .jsx or .tsx file, and pick the file. The app runs in your phone's browser.

In our iPhone-size test the viewer's page was 393 pixels wide, the width of the screen, and the app's button worked with a tap.

What each way of opening a .tsx file shows

Way to open itWhat you seeThe app works
Choose it in Convika's React viewerThe running appYes
Paste its code into the React viewerThe running appYes
Open it as an address in a browser tabThe code, as textNo
Double-click it on a Mac or a PCThe code, in the app set for that file typeNo

If the viewer shows an error

The viewer names the line of your code the error is on. A .tsx file that is one part of a project imports its other parts, and the viewer says so. Our second test file had the line import { Chart } from "./Chart";, and the viewer answered: "Line 2 imports ./Chart, another file of the AI's project. Paste that file's code into this one, or ask the AI to put everything in one file."

If an AI wrote the file, paste this into the same chat, then open the new file:

Put the whole app in one .tsx file, with every component in that file.

For your own project, paste the imported component's code into the same file and open it again.

Convert a TSX file to HTML

Choose the file in the React viewer and click Download as .html. You get one HTML file with your component in it, compiled to JavaScript. It loads React and the libraries from public CDNs, so it opens in any browser that is online, and any host takes it.

Get a link by uploading this app makes a private link that works for 3 minutes: time to open the app on your phone. For a link that stays the same, publish the app:

  1. In the React viewer, click Download as .html.
  2. Open Convika's free HTML publishing tool and drop the file in. You get a preview link without an account.
  3. Click Keep this page — free, no card and sign up. The page moves into your account, and its scripts run in the dashboard preview.
  4. Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends.
  5. Copy the address, such as yourapp.convika.page, and send it. Anyone opens it in a browser and uses the app.

The Free plan includes 1 published page and 10,000 page views a month, and the dashboard shows how many people opened the app.

Frequently asked questions

How do I open a TSX file online?

Open Convika's free React viewer, click Open file, and choose the .tsx file. The viewer strips the TypeScript, compiles the JSX in your browser, and runs the component on the page. It takes no install, no build, and no signup.

How do I open .tsx files in a browser?

Choose the file in the React viewer, which runs in Chrome, Edge, and Safari. A .tsx file opened as an address in a browser tab shows its code as text, because a browser runs JavaScript and HTML, not TypeScript with JSX.

What is a .tsx file?

A React component written in TypeScript. TypeScript's handbook says that to use JSX you "Name your files with a .tsx extension", and React's documentation calls it "a TypeScript-specific extension that tells TypeScript that this file contains JSX". A React project written in TypeScript keeps its components in .tsx files.

What is the difference between a .tsx and a .jsx file?

Both hold a React component with JSX. A .tsx file adds TypeScript: types, interfaces, enums, and generics. The React viewer opens both the same way. See how to open a JSX file for the .jsx steps.

How do I run a TSX file without Node or npm?

Open it in the React viewer. Your browser does the compiling, and the viewer loads React and each package the file imports from a CDN. Nothing is installed on your computer.

How do I convert a TSX file to HTML?

Choose the file in the React viewer and click Download as .html. In our test, a 1.5 KB .tsx component became a 16 KB HTML file that ran when opened from disk.

Is the .tsx file uploaded when I open it?

No. Your browser compiles the code and builds the page on your device. The app is uploaded only when you click Get a link by uploading this app.

Sources

Next step

How to password protect an HTML page or website

A JavaScript password script leaves the password in the page source. To password protect an HTML page or link, encrypt the file or let a server check it.

Related articles

More ways to send your page

Skipbox

Cheap & fast GitHub Actions runners, unlimited for $39 a month

Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.

Start a free Skipbox trial⁠

Share this article

Send the app in your .tsx file as a link

Run the .tsx file in the React viewer, download it as one .html file, and publish it. Anyone opens the link in a browser and uses the app.

Get a link for my app

Pro starts with a free trial: 7 days free, then $12 a month. Cancel any time before the trial ends.