Text to Markdown

Turn plain text from e-mails, notes or pasted output into Markdown: headings, lists, links, code blocks and tables, each rule switchable and

loading Text to Markdown
About this tool

What is a text to Markdown converter?

Markdown is plain text with a few conventions: # makes a heading, a hyphen starts a list item, indentation makes code, pipes make a table. Most text we receive does not follow them. An e-mail has a title in capital letters, a list typed with bullets or 1), a table copied from a spreadsheet, a command pasted with indentation. This tool reads that kind of text and rewrites it as Markdown using rules you can see, switch on and switch off.

Nothing is guessed in secret. Each rule is a switch in the options bar, has a one-sentence explanation, and shows how many times it acted on your text. If a rule does something you did not want, turn it off and the result changes at once. Everything runs in your browser, so a private e-mail or a log with internal host names is never uploaded.

The rules are: headings (a line in ALL CAPS, or a short line ending in a colon), lists (bullets, 1., 1), a), with indentation becoming nesting), code blocks (lines indented by four spaces or a tab), tables (cells separated by TAB, by commas or by two or more spaces), links (web addresses, www. addresses and e-mail addresses), quotes (lines that start with >) and escaping (a backslash before characters Markdown would read as formatting). A separate choice decides what to do with line breaks inside a paragraph: keep them, join them with a space, or force each one to show.

If your source is a web page or a Word file instead of plain text, use Paste as Markdown, which reads the formatting that comes with the clipboard. To check the result against the original, open it in Compare texts.

How to use it

  1. Paste your text on the left. The page opens with an example e-mail loaded so you can see every rule at work.
  2. Look at the Markdown on the right. The status line says how many rules acted, and the list under the editor shows the count for each one.
  3. Switch off any rule that did something you did not want. For example, turn off Headings if a line in capital letters is only a shouted word.
  4. Choose how line breaks inside paragraphs are handled. Keep is right for text that is already one line per paragraph; Join is right for e-mail wrapped at 72 columns.
  5. Pick the link style (<url> or [url](url)) and the level of the capital-letter headings.
  6. Copy the Markdown, download it as a file, or continue with another tool.

Examples

An e-mail with a title, a list and a table

Input:

WEEKLY REPORT

Done:
- fixed the login bug
- moved the staging server
  - DNS updated

Region	Q1	Q2
North	10	12
South	8	9

Output:

## WEEKLY REPORT

### Done

- fixed the login bug
- moved the staging server
  - DNS updated

| Region | Q1 | Q2 |
| --- | ---: | ---: |
| North | 10 | 12 |
| South | 8 | 9 |

The capital-letter line became a level 2 heading, the line ending in a colon became level 3, the indentation became a nested list, and the tab-separated lines became a table. The numeric columns are aligned to the right.

A command pasted from a terminal

Four spaces or a tab in front of every line of a block tell the tool it is code. It removes the common indentation and wraps the block in a fence. If the code itself contains a fence of three backticks, the outer fence gets one more backtick so the block does not end early.

    npm install
    npm run build

Two lists side by side

Two lists of the same kind separated only by a blank line would merge into one list in Markdown. The tool avoids that: the second bullet list uses * instead of -, and the second numbered list uses ) instead of .. Letters such as a) and b) become numbers, because Markdown has no lettered lists.

Special characters in running text

With escaping on, 2 * 3 * 4 becomes 2 \* 3 \* 4, and snake_case is left alone because an underscore inside a word does nothing in Markdown. A line that starts with # not a title or 1. not a list gets a backslash so it stays text.

Common mistakes

  • Expecting every ALL CAPS line to be a heading. Lines shorter than three letters, lines ending with a period and several capital-letter lines in a row are left as text. If a heading is missed, edit the source.
  • Spaces that look like columns. Output of commands such as ps or kubectl get has columns separated by two or more spaces and becomes a table. A paragraph with double spaces after a period does not, because a table needs the same number of cells in every line.
  • Commas in sentences. Lines with commas become a table only when every line has the same number of short cells and none ends like a sentence. Turn the comma rule off if your data is prose.
  • Leaving escaping on for text that is already Markdown. If your input has **bold** or [links](url) that you wrote on purpose, escaping will neutralise them. Turn Escape off.
  • Indented lists treated as code. A block that starts with a bullet is read as a list even when indented. Other indented blocks are code.

Frequently asked questions

Is my text uploaded anywhere?

No. The conversion runs in your browser and the text is never stored; only your option choices are remembered on this device.

Why did a line in capital letters not become a heading?

The rule asks for at least three letters, no final period or comma, a line of at most 80 characters, and a neighbour that is not also in capital letters. If it still does not fit your case, turn the rule off and add the # yourself.

Does it convert bold and italics?

Plain text has no formatting to convert. Pasting from a web page, Word or Google Docs does carry bold, italics and tables: for that use Paste as Markdown or HTML to Markdown.

Can I build a table from scratch?

Yes, with the Markdown table generator, which has a grid editor.

What about spaces and line endings?

Windows line endings are normalised, trailing spaces are removed and runs of blank lines count as one separator. For deeper clean-up of lines use Line tools.

Report a problem