SQL Enum Formatter

SQL Enum Formatter

Turn a messy list of values into quoted values you can paste into SQL
PricefreeLocal processingOffline

About this converter

SQL Enum Formatter turns a messy list of values into a quoted, comma-separated string you can paste straight into a SQL IN clause or an ENUM column definition. Paste the values however you have them — one per line, comma-separated, or mixed with other punctuation — and it splits them apart and wraps each one in quotes.

The default separators are line breaks, commas and tabs, so the input apple, banana becomes "apple","banana". Every other punctuation or symbol character found in your input is detected and listed as a tick box, switched off until you turn it on — a dash inside 2024-01-01, an underscore inside ORDER_PAID or a dot inside 1.5 therefore never splits a value by accident.

The conversion runs entirely in your browser and works offline; nothing you paste is uploaded.

Delimiters
CharacterDefaultNote
Line breakOn — cannot be turned offEach line becomes one value
Comma , ,OnReady to use out of the box
TabOnHandy when you paste a column straight out of a spreadsheet
Full-width space · non-breaking spaceOff — tick to enableSeen when copying from Chinese web pages
Semicolon ; ; 、Off — tick to enableTurn it on when your list came from a sentence
Dash - — –Off — tick to enableKeeps dates such as 2024-01-01 in one piece
Quotes " ' “ ”Off — tick to enableTurning them on strips the quotes around a value
Slash / \Off — tick to enableAs do brackets, asterisks and other symbols
Underscore _ dot .Off — tick to enableKeeps ORDER_PAID and 1.5 intact
Plain spaceNeverStays inside values, e.g. New York

Frequently asked questions

What does this tool do?

It turns a loose list of values into a quoted, comma-separated string that is ready to paste into a SQL IN clause or a SQL ENUM definition, for example "apple","banana","cherry".

Which delimiters does it split on by default?

Line breaks, commas (both the half-width comma and the full-width Chinese comma) and tabs. Every other character is off by default.

How do I split on a semicolon, a slash or a dash?

Open "Custom delimiters" and tick that character. Every punctuation or symbol character found in your input is already listed there, so nothing has to be typed in.

Can I stop commas from splitting my values?

Yes. The comma is ticked by default, so untick it in "Custom delimiters" if a comma belongs inside a value. A plain space is never treated as a separator, so a value such as New York stays intact.

Can I output single quotes instead of double quotes?

Yes. Switch the Quotes option to single quotes and the output becomes 'apple','banana','cherry'. Double quotes are the default.

Are duplicates removed?

Yes. Duplicates are removed by default, keeping the first occurrence. You can turn this off with the "Remove duplicates" checkbox.

Are empty values kept?

No. Blank entries are dropped, so a trailing comma does not produce an empty "" value.

Is my data uploaded anywhere?

No. The conversion happens entirely in your browser and works offline; nothing you paste leaves your device.