Markdown Table Generator
Convert JSON or CSV data into clean Markdown tables. Customize headers and alignment for documentation, README files, or any text-based workflow.
Run tool
The Markdown Table Generator turns structured data into formatted Markdown tables. Paste JSON or CSV text into the input area, choose the input format, and optionally set custom headers and column alignment. The tool processes the data and outputs a ready-to-use Markdown table that you can copy into any document, README, or wiki page. JSON objects are converted row by row, with table headers taken from the first object's keys unless you supply custom headers. CSV input uses the first line as headers by default. Alignment options include left, center, and right, with left as the default. Empty or zero JSON values produce an empty table rather than an error. Malformed JSON or unsupported format values result in an error message and no table output. This generator is useful for developers, technical writers, and anyone who needs to present tabular data in Markdown without manual formatting. It is a free online tool that processes your data and outputs a Markdown table.
Instructions
- Open the Markdown Table Generator tool in your browser.
- Paste your JSON or CSV data into the 'JSON or CSV data' text area.
- Select the input format: 'Json' or 'Csv' from the dropdown menu.
- Optionally, enter custom headers as a comma-separated list in the 'Custom headers' field. Leave blank to use default headers from the data.
- Choose a column alignment: 'Left', 'Center', or 'Right'. Left is the default.
- Click the 'Run' button to generate the Markdown table.
- Copy the resulting table text from the output area and paste it into your document.
Examples
- Example 1: JSON input with default headers. Paste: [{"Name":"Alice","Age":30},{"Name":"Bob","Age":25}]. Select format 'Json'. Leave headers blank. Alignment 'Left'. Output: | Name | Age |\n| --- | --- |\n| Alice | 30 |\n| Bob | 25 |
- Example 2: CSV input with custom headers. Paste: "apple,red\nbanana,yellow". Select format 'Csv'. Enter custom headers: 'Fruit, Color'. Alignment 'Center'. Output: | Fruit | Color |\n| :---: | :---: |\n| apple | red |\n| banana | yellow |
- Example 3: JSON single object. Paste: {"Product":"Widget","Price":9.99}. Output: | Product | Price |\n| --- | --- |\n| Widget | 9.99 |
- Example 4: Empty JSON array. Paste: []. Output: (empty table with headers only, or no rows).
FAQ
What input formats are supported?
The tool supports JSON and CSV. For JSON, provide an array of objects or a single object. For CSV, use newlines for rows and commas for fields.
Can I use custom column headers?
Yes. Enter custom headers as a comma-separated list in the 'Custom headers' field. If left blank, headers are taken from the first row of data.
What alignment options are available?
You can choose Left, Center, or Right alignment. Left is the default. The alignment affects the Markdown alignment markers in the table.
What happens if my JSON is invalid?
If the JSON is invalid, an error message appears and no table is produced. Make sure your JSON is properly formatted.
Does the tool handle empty data?
Yes. Empty or zero JSON values (like an empty array, empty object, zero, or empty string) produce an empty table with headers but no rows.