.ts, .tsx · 100% private

Open TypeScript files online

Drop a TypeScript file to preview it instantly in your browser. Free and private: your file is never uploaded, and no account is needed.

Drop your TypeScript file here
or click to browse your device
file
Preview
Drop a file on the panel above to begin
Files never leave your device No sign-up, no account Free forever

What is a TypeScript file?

TypeScript is JavaScript with static types. A .ts file holds TypeScript code and a .tsx file adds JSX syntax for React components.

The compiler removes the types and produces plain JavaScript, so TypeScript is used heavily in front-end and Node.js projects.

Full nameTypeScript Source File
File extensions.ts, .tsx
MIME typetext/typescript
Developed byMicrosoft
Introduced2012

How to open a TypeScript file online

  1. Drop the file. Drag your .ts, .tsx file onto the panel at the top of this page, or click it to pick the file from your device.
  2. See it instantly. Your browser reads the file locally and shows the preview in a second or two.
  3. View full screen or download. Use the full screen button for a distraction-free view, or download a copy. Close the page when you are finished and nothing is kept.

How Drop and Open displays TypeScript files

Drop and Open reads the file locally as UTF-8 text and shows it in a monospace block with line breaks preserved. The content is inserted as plain text, so nothing inside the file can run. No syntax highlighting is applied.

Good to know: A .ts extension is also used for MPEG transport stream video files. If your file is video, the preview will show unreadable text; use a media player instead.

What TypeScript files are used for

  • React and Angular applications
  • Node.js services
  • Shared libraries
  • Type definitions (.d.ts)

Tips for working with TypeScript files

  • Run tsc to type-check without producing output.
  • Avoid the any type where possible.
  • Look for exported types first when reading unfamiliar code.

Is it private to open a TypeScript file here?

Yes. Drop and Open runs entirely in your browser. When you choose a file, the browser reads it into local memory and displays it. There is no upload, no account, and no server-side copy. You can check this by opening your browser's developer tools, watching the Network tab and dropping a file. Learn more in our guide to client-side and server-side viewers.

TypeScript viewer questions

Is a .ts file always TypeScript?
No. It can also be a video transport stream, usually from a TV recorder.
What is .tsx?
TypeScript with JSX syntax, used by React.
Can browsers run TypeScript?
Not directly. It must be compiled to JavaScript.
Is it uploaded?
No.