Report

Help us improve this tool

Flow To TypeScript Converter

Transform Flow annotated JavaScript into TypeScript source code with accurate type syntax in your browser.

O M T

Convert Flow to TypeScript

Flow and TypeScript both add static typing to JavaScript, but their syntax differs. Migrating a Flow codebase to TypeScript manually is slow and error-prone. This converter transforms Flow annotations into TypeScript source code instantly so you can review and commit the output.

What this tool does

Paste Flow-annotated JavaScript and receive equivalent TypeScript with interfaces, type aliases, generics, and function signatures preserved. The conversion runs entirely in your browser using the same transformation logic popularized by the Khan Academy flow-to-ts project.

Related migration tools

Need declaration files only? Use the Flow to TypeScript Declaration Converter to emit .d.ts output. To strip types entirely, try the Flow to JavaScript Converter. For formatting the result, pair this with the TypeScript Formatter.

Frequently Asked Questions

Does this preserve Flow-specific syntax exactly?

The converter maps Flow constructs to their closest TypeScript equivalents. Most type aliases, object types, unions, and function annotations transfer cleanly. Review edge cases such as exact object types or uncommon utility types before committing output.

Can I upload a file instead of pasting code?

Yes. Use the file upload button on the input editor to load .js, .jsx, .flow, or plain text files. Output updates automatically as you edit.

Is my source code sent to a server?

No. Parsing and conversion happen locally in your browser. Your code never leaves your device during transformation.

How is this different from the declaration converter?

This tool outputs full TypeScript source with function bodies and implementation code intact. The declaration converter strips implementations and emits .d.ts files suitable for type-only packages.