TypeScript to Flow Converter
Paste a TypeScript interface or type to instantly generate matching Flow type declarations. Free online developer tool.
Paste TypeScript
Flow Types
Flow type output will appear here...
Free TypeScript to Flow Converter
Paste a TypeScript interface or type to instantly generate matching Flow type declarations, with optional and array fields carried over automatically.
How to Use It
Paste TypeScript source into the input box, or click "Load Example." The tool parses the first top-level interface or type declaration in your source with the TypeScript compiler, resolving any other top-level interfaces it references by name, and emits an exact Flow type for each object level, using Flow's {| ... |} exact object syntax, ? for nullable fields, and trailing ?: for optional properties.
Example
Given an Address interface with an optional zip field and a User interface referencing it, the tool emits a UserAddress Flow type plus a User type that references it, with zip?: string, and tags: string[], preserved exactly.
Common Use Cases
- Porting TypeScript type definitions into a Flow-typed codebase.
- Comparing how the same shape reads in TypeScript versus Flow syntax.
- Bootstrapping Flow types for a shared API contract already documented in TypeScript.
FAQs
Does this support more than one interface at a time?
The tool converts the first top-level interface or type in your input as the root type. If that root type references other top-level interfaces from the same file by name (likeaddress: Address), those are resolved and inlined as nested Flow types automatically — but interfaces that aren't referenced from the root are ignored.
What happens to unsupported TypeScript features?
Generics, mapped types, conditional types, and other advanced TypeScript features fall back to Flow'smixed type rather than an incorrect guess — you can refine those fields by hand afterward.
Is my TypeScript uploaded anywhere?
No — parsing and type generation happen entirely client-side in your browser, using the TypeScript compiler loaded on demand. Nothing you paste is sent to a server.
