Hongmu Notes

CSV to Markdown table

The CSV to Markdown table parses comma-separated data according to universal quotation mark rules, and commas within fields will not be mistaken for column boundaries.
100% Browser local processing 0 Data upload

📋 Conversion settings

💡 Instructions for use

  • Content copied from spreadsheet software is separated by tab characters by default. This tool can automatically identify tab characters, commas and vertical bars.
  • If the cell content is in quotation marks, it will be parsed according to the general rules, and the delimiters within the quotation marks will not be regarded as column boundaries.
  • Vertical bars within cells will be escaped to avoid conflict with table column separators; line breaks within cells will be replaced with spaces.
  • When the tab version is reversely converted and output, it can be directly pasted back into the spreadsheet software without further column separation.
  • The content is only converted within the browser and is not uploaded or saved; if you need to keep it as a file, please copy or download the results.

The CSV to Markdown table parses comma-separated data according to universal quotation mark rules, and commas within fields will not be mistaken for column boundaries.

Why are quotation marks important?

The comma-separated format allows commas, newlines, and quotation marks to appear in fields. The price is to wrap the field in double quotation marks and write two quotation marks inside the field. If this rule is not processed during parsing, address or description fields containing commas will be split into multiple columns, making the entire table misaligned and difficult to find. The tool parses character by character according to standard rules and prompts when a quoted field is recognized. The prompt appears indicating that such fields exist in the source data, which is a normal phenomenon.

Two practical approaches

  • If you are not sure about the separation method, keep automatic recognition, and the tool will compare the occurrences of various separators in the first few lines.
  • If the number of columns in the source data is inconsistent, correct it first and then convert it to avoid redundant empty columns in the result. After conversion, you can use the reverse direction to restore the table back to separated text for verification.

Pay attention to quotation marks when delimiting text: When a field contains a delimiter, it is usually wrapped in quotation marks. When parsing, it should be treated as a whole instead of being cut according to the delimiter.

You should also pay attention to encoding: if files containing Chinese characters do not have byte order markers, some environments will cause garbled characters when opened. Before pasting, make sure the display is normal and then convert.

The delimiters and encoding must be consistent with the source. If it contains Chinese, you must first confirm whether the display is normal before performing conversion.

Fields containing commas must be wrapped in double quotes, otherwise they will be delisted.

📖 Glossary

Markdown table
A plain text table is written with vertical lines separating cells and a line of short horizontal lines marking the table header. After rendering, it becomes a web table.
delimiter
The character used to separate columns, tabs are used for content copied by spreadsheet software, and commas are used for comma-delimited files.
escape
Add a backslash before special characters so that they are not interpreted as syntax symbols. For example, vertical bars in cells need to be escaped.
alignment mark
The colon in the header delimiter line is written on the left to indicate left alignment, both sides indicate centering, and the colon on the right indicates right alignment.
wrapped in quotation marks
When the field content contains delimiters or quotation marks, use double quotation marks and write two internal quotation marks. This is a general rule for delimiting text.
Header
Markdown tables must have a row of headers, and placeholder column names should be automatically filled in if missing.
Column width padding
Fill in spaces in the source code to align the columns for easier reading, but does not affect the final rendering effect.
cell
The smallest unit formed by the intersection of rows and columns in a table. Markdown table cells do not support crossing rows and columns.
automatic recognition
Which delimiter is used is inferred based on the number of occurrences of each delimiter in the previous lines.
plain text table
A tabular expression that does not contain format information and only relies on characters to divide rows and columns is convenient for version management and difference comparison.

🔗 All keywords and tutorials

Keywords page of the tool11a

Return to tool home page

❓ FAQ

What to do if there are commas in the field?
Just wrap the field in double quotes, and the tool will parse it according to standard rules and will not treat it as a column separator.
What happens if tabs and commas are mixed??
Automatic recognition will select the one that appears the most; if the result does not meet expectations, just manually specify the separation method.