List Formatter
Convert lines into bullets, numbers, CSV, or JSON
List Formatter — what it does
Convert a plain list of lines into a bullet list, a numbered list, a comma-separated string, or a JSON array, with an option to quote CSV values. One list, four destinations — a document, a Markdown file, a spreadsheet cell or a piece of code.
Worked example
A list of furniture items converted with Output format set to JSON array. The input has a line with leading spaces, an empty line, an item containing a comma and one containing quotation marks.
Input — one item per line
Standing desk Monitor arm, dual Keyboard tray Cable "spine" Footrest
Output — JSON array
[ "Standing desk", "Monitor arm, dual", "Keyboard tray", "Cable \"spine\"", "Footrest" ]
Leading spaces are trimmed and the empty line is dropped; the quotation marks in Cable "spine" are escaped as \" so the array stays valid JSON.
When this tool helps
- Turning meeting notes into a bulleted or numbered list for a document.
- Converting a list of IDs into a JSON array for a code file or an API call.
- Producing a comma-separated string from a column for a query or a form field.
How to use it
- Paste the lines into the input box.
- Choose the output format.
- Enable quoting if the CSV values need it.
- Process and copy the formatted list.
Accuracy, limits, and good practice
- Quote CSV values whenever any item could contain a comma, or the receiving parser will split that item into two fields.
- JSON array output escapes quotes and special characters, so the result pastes straight into code without further editing.
- Numbered output is fixed text, not a live list — reordering the lines later means regenerating the numbering.
- Decide the destination before choosing a format: the same list becomes bullets for a document, a JSON array for code and a comma string for a form field.
Frequently asked questions
Which format for a Markdown document?
Bullet or numbered list. Both use the standard Markdown markers and render in any Markdown environment.
How do I go the other way?
The join lines tool combines lines into one string; use this tool to expand a list back out into formatted lines.
Are empty lines included?
Blank entries generally produce empty items, so clean them out beforehand for a tidy result.
Does it renumber an already numbered list?
Existing numbers are treated as part of the text. Strip them with the line number tool first to avoid doubled numbering.
What does the Quoted CSV values format actually quote?
Only items that contain a comma, a double quote or a line break are wrapped in double quotes, and any quote inside them is doubled. The same six-line list produces: Standing desk,"Monitor arm, dual",Keyboard tray,"Cable ""spine""",Footrest — plain items stay unquoted. Choose Comma separated if you want no quoting at all.
Can I paste items separated by commas on one line?
No. The tool only splits on line breaks, so a line such as "desk, chair, lamp" is treated as a single item and becomes one array element or one bullet. Put each item on its own line first.
Related tools on this site
- URL Encoder & Decoder — Encode or decode URL components safely
- CSS Formatter & Minifier — Format or minify CSS code directly in the browser
- Join Lines — Combine multiple lines using spaces, commas, or a custom separator
Further reading: Cleaning Up Text You Pasted From Somewhere Else
Everything above runs inside this page. List Formatter needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
清單格式轉換能做什麼
把單純的多行清單轉成項目符號清單、編號清單、逗號分隔字串或 JSON 陣列,CSV 值還可選擇是否加引號。一份清單、四個去處——文件、Markdown 檔、試算表儲存格,或一段程式碼。
實際範例
一份家具清單在「轉換格式」選「JSON 陣列」的設定下轉換。來源文字中有一行開頭帶空格、一行空白、一個項目含逗號、一個項目含雙引號。
來源:每行一個項目
Standing desk Monitor arm, dual Keyboard tray Cable "spine" Footrest
轉換後:JSON 陣列
[ "Standing desk", "Monitor arm, dual", "Keyboard tray", "Cable \"spine\"", "Footrest" ]
行首空格會被修剪,空白行會被略過;Cable "spine" 裡的雙引號被跳脫成 \",陣列因此仍是合法的 JSON。
什麼時候用得上
- 把會議筆記轉成文件用的項目符號或編號清單。
- 把一串 ID 轉成 JSON 陣列,供程式檔或 API 呼叫使用。
- 從一欄資料產出逗號分隔字串,用於查詢或表單欄位。
使用步驟
- 把文字行貼進輸入框。
- 選擇輸出格式。
- CSV 值有需要時開啟加引號。
- 執行處理並複製格式化後的清單。
精確度、限制與實務建議
- 只要有項目可能含逗號,CSV 就務必加引號,否則接收端會把那個項目切成兩欄。
- JSON 陣列輸出會逸出引號與特殊字元,結果可直接貼進程式碼、不必再修。
- 編號輸出是固定文字而非動態清單——之後調整行序就得重新產生編號。
- 請先決定去處再選格式:同一份清單,進文件是項目符號、進程式是 JSON 陣列、進表單欄位是逗號字串。
常見問題
Markdown 文件該用哪種格式?
項目符號或編號清單,兩者都使用標準 Markdown 標記,在任何 Markdown 環境都能渲染。
反方向怎麼做?
合併行工具可把多行併成一個字串;本工具則把清單重新展開成格式化的多行。
空行會被包含嗎?
空白項通常會產生空項目,建議先清乾淨,結果才整齊。
已經有編號的清單會重新編號嗎?
既有編號會被視為文字的一部分。請先用行號工具移除,以免出現雙重編號。
「加引號的 CSV 值」格式實際上會替哪些項目加引號?
只有含逗號、雙引號或換行的項目會被雙引號包起來,裡面的引號會寫成兩個。同一份六行清單會變成:Standing desk,"Monitor arm, dual",Keyboard tray,"Cable ""spine""",Footrest,一般項目維持不加引號。若完全不想加引號,請改選「逗號分隔」。
可以貼上寫在同一行、以逗號隔開的項目嗎?
不行。工具只依換行切分,所以「desk, chair, lamp」這樣的一行會被視為單一項目,變成陣列裡的一個元素或一個項目符號。請先把每個項目放到各自的一行。
本站相關工具
- 網址編碼與解碼 — 安全地編碼或解碼網址元件
- CSS 格式化與壓縮 — 直接在瀏覽器中格式化或壓縮 CSS
- 合併文字行 — 使用空格、逗號或自訂分隔符合併多行文字
延伸閱讀: 清理從別處貼上的文字
以上步驟全部在這個頁面內完成,清單格式轉換 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。