Convert a Website Table to Markdown
Taking a table copied from a website and converting that HTML table to Markdown is easy with Table to Markdown.
How it works
Web browsers add content copied from a webpage to your clipboard as normal text and as HTML. This means that when you copy a table from a website, your clipboard contains an HTML version of that table.
When you paste into the box above, Table to Markdown reads the pasted table using JavaScript, and uses JavaScript to convert the HTML into Markdown.
It just takes a few steps:
1. Select the website table you'd like to convert to Markdown
2. Copy the table to your clipboard
You can right-click and select "Copy" or type
3. Paste the table in the Table to Markdown paste area
You can right-click and select "Paste" or type
4. Click the "Convert" button
Once you click "Convert", you'll see a Markdown version of your table ready for use:
| Dependencies | Dev Dependencies |
| --------------------- | ---------------------- |
| `django` | `black` |
| `django-redis` | `bpython` |
| `djangorestframework` | `django-debug-toolbar` |
| `pendulum` | `factory_boy` |
| `psycopg2-binary` | `flake8` |
| `redis` | `flake8-mypy` |
| | `mypy` |
| | `pytest` |
| | `pytest-watch` |
That's all there is to it!
Alternatives
Other tools exist that can convert HTML to Markdown. Unlike Table to Markdown, however, they require pasting raw HTML and do not recognize HTML copied into a user's clipboard.
Still, if you're looking at a table in an HTML document and need to convert it to Markdown, these tools could come in handy.
Mr.42 HTML to Markdown Converter
HTML to Markdown Converter from Mr.42 is one such tool. It does a good job of handling HTML tags without Markdown syntax, like <sup>
, but it doesn't output equal-width columns and doesn't convert the first row to a header.
Try pandoc
Try pandoc! is an online demo of Pandoc, a library that can convert between dozens of formats and markups, including HTML to Markdown.
Pandoc outputs equal-width columns and handles HTML tags like <sup>
properly by converting their contents to Markdown. It's a good option for converting between HTML and Markdown, especially when used as a command-line utility to convert entire HTML files to Markdown.