← All tools

MySQL ENUM to TypeScript Union

Convert one quoted MySQL ENUM definition to an escaped TypeScript union with explicit SQL quoting modes and an optional type alias.

mysql-enum-to-typescriptLOCAL WORKSPACE

Enabling local controls…

1. Input and settings

Input limit: 128 KiB UTF-8; local Worker processing: five seconds. HTML: 30,000 nodes; ENUM: 1,000 members; JSON: 1,000 rows, 50 columns, 20 levels. Edits clear old results. No transmission, storage or URL insertion. Source date: 2026-10-18.

MySQL 8.4: String literals

2. Complete result

Enter text or load a sample, then generate.

How to use this tool

Paste ENUM(...), a column definition or a quoted value list. Match SQL modes, set an optional type name, then convert automatically or explicitly.

When not to use it

Converts literal members only; it does not execute SQL, connect to a database or model MySQL collation, duplicate-member warnings and trailing-space normalization. One ENUM per conversion.