Skip to content

Online Markdown editor

Type Markdown on the left and see the finished page on the right. Open and save .md files, copy clean HTML, print to PDF.

0 words0 characters0 min readSaved in this browser
Your text stays on this device and is saved in this browser as you type. Want a visual editor instead? Try the HTML editor or the rich text editor.

    Formatting commands act on the selected text. Ctrl Z undoes them.

    Advertisement
    Two pages side by side: Markdown symbols on the left and the formatted result on the right

    How to use the Markdown editor

    Write on the left. The right side shows the page as a reader will see it, and it updates while you type. The toolbar adds the marks for you: select a word and click B, or press Ctrl+B, and the word gets two asterisks on each side.

    1. Write or openType Markdown, paste it, or drop a .md or .txt file on the page.
    2. Check the previewHeadings, lists, links and tables show up on the right as you type.
    3. Save or copySave the .md file, download a web page, or copy the HTML into your site.

    What is Markdown?

    Markdown is a way to write formatted text with plain characters. A # at the start of a line makes a heading, and two asterisks around a word make it bold. The file stays plain text, so any editor can open it, and people can read it even without a preview.

    John Gruber made Markdown in 2004. His rules left many details open, so each tool filled them in a little differently. In 2014 CommonMark wrote down exact rules, and GitHub built its own version on top of them. This editor follows CommonMark and adds the GitHub extras, called GitHub Flavored Markdown (GFM).

    The ten rules that cover most of Markdown

    These rules are enough for most notes and README files. Footnotes, escaping and the other extras are in the Cheat sheet above the editor.

    RuleYou typeYou get
    Headings
    # Title
    ## Section
    ### Smaller heading

    Title

    Section

    Smaller heading

    Paragraphs and line breaks
    One paragraph.
    
    A blank line starts a new one.  
    Two spaces at the end make a line break.

    One paragraph.

    A blank line starts a new one.
    Two spaces at the end make a line break.

    Bold and italic
    **bold**, *italic* and ***both***

    bold, italic and both

    Lists
    - Apples
    - Pears
      - Nested with two spaces
    
    1. First
    2. Second
    • Apples
    • Pears
      • Nested with two spaces
    1. First
    2. Second
    Links
    [TextEditor.com](https://texteditor.com/ "Free text tools")
    or just <https://texteditor.com/>

    TextEditor.com
    or just https://texteditor.com/

    Images
    ![A split sheet of paper](/assets/img/hero/html-editor-600.jpg)

    A split sheet of paper

    Code
    Inline `code` in a sentence.
    
    ```js
    let total = price * 2;
    ```

    Inline code in a sentence.

    let total = price * 2;
    Quotes
    > A quote.
    > It can run over several lines.

    A quote. It can run over several lines.

    Horizontal rule
    Above the line
    
    ---
    
    Below the line

    Above the line


    Below the line

    Tables
    | Item  | Price |
    |:------|------:|
    | Bread |  2.50 |
    | Milk  |  1.20 |
    ItemPrice
    Bread2.50
    Milk1.20

    Common Markdown mistakes

    Most Markdown problems come from spaces and blank lines. Click the button to see the fixed source next to the result.

    What went wrong, and the fix
    MistakeYou typeYou get
    No blank line before a listThis one works in most editors today, including this one. Older tools glue the list to the sentence. A blank line is always safe.
    Shopping:
    - bread
    - milk

    Shopping:

    • bread
    • milk
    Enter alone does not break a lineBoth lines join into one. End the first line with two spaces or a backslash to break it.
    Roses are red
    Violets are blue

    Roses are red Violets are blue

    Four spaces or a tab turns text into codeFour spaces at the start of a line mean a code block. Tabs count as four spaces. Nested lists need only two spaces.
    Dear team,
    
        Thanks for the report.

    Dear team,

    Thanks for the report.
    No space after the hashWithout the space it is just a hashtag in a paragraph.
    #Summary

    #Summary

    Underscores inside wordsAn underscore inside a word never starts italics, so file names are safe. Asterisks do work inside words.
    snake_case_name is *not* italic

    snake_case_name is not italic

    Markdown, HTML or rich text?

    All three give you headings, bold text and lists. They differ in who reads the file and how much control you get.

    MarkdownHTMLRich text
    What you see while writingPlain text with a few marksTags like <p> and <a>The finished look, like in Word
    Good forNotes, README files, docs, forum postsWeb pages, email templates, exact layoutLetters, email, pasting into Word
    Control over the lookLow: the site that shows it picks the styleFull, with CSSMedium: fonts and colors, no code
    Opens inAny text editor, GitHub, note appsAny browserWord, Google Docs, email
    Tool on this siteThis pageHTML editor and cleanerRich text editor

    Markdown can hold HTML for the things it can't do, like a picture with a set width. The preview here removes scripts from such tags, so pasted code can't run on this page.

    Where .md files are used

    A file that ends in .md is a Markdown file. GitHub shows the README.md of each project on its front page. Note apps like Obsidian and Joplin keep each note as a .md file, so the notes stay readable without the app. Site builders like Hugo and Jekyll turn a folder of .md files into a website. Reddit and Stack Overflow read the basic marks too, each with a few small differences.

    Tables in Markdown

    Tables were not part of the first Markdown. They come from GitHub's version, and most tools read them now. Pipes split the cells, and a row of hyphens under the first row makes it the header. A colon at the left or right end of the hyphens aligns that column. Lining up the pipes by hand is slow, so the Markdown table generator builds the text from a grid or a pasted spreadsheet.

    Saving and exporting

    Save .md writes a Markdown file. In Chrome and Edge the first save asks where to put it, and later saves go back into the same file. Other browsers download a new copy each time.

    Copy formatted puts the preview on the clipboard as rich text, so headings and lists stay when you paste into Word, Google Docs or an email. For a PDF, pick PDF in the Download menu and choose "Save as PDF" as the printer. Only the preview is printed.

    Frequently asked questions

    How do I convert Markdown to HTML?

    Paste or type the Markdown on the left, then click Copy HTML. The clipboard holds the HTML of the preview. Download as .html gives you a complete page with a style sheet that follows your light or dark setting.

    How do I open a .md file?

    Drop the file on this page, or click Open file. A .md file is plain text, so Notepad and every other text editor can open it too, but they show the marks instead of the finished page.

    Does this editor support GitHub Flavored Markdown?

    Yes. Tables, task lists with [ ] and [x], strikethrough with two tildes, bare web addresses as links and footnotes all work.

    Does Discord use the same Markdown?

    Mostly. Discord adds spoilers, subtext and timestamps, and has no tables. The Discord fonts page previews Discord's own version.

    • Text editorWrite and edit text online for free, then convert it to fancy fonts, bold, frames and ASCII art in one click.
    • Code editorWrite or paste HTML, CSS, JavaScript, JSON, Python, SQL and more with colors, line numbers and a format button.
    • Table editorOpen an Excel or OpenDocument file, or paste cells from a spreadsheet, and edit them in a grid.
    • Word counterCount words, sentences and paragraphs as you type.
    • Text comparePaste two texts and see every changed line and word highlighted side by side.
    • ASCII tableAll 256 ASCII codes, the 128 standard ones and extended ASCII, with decimal, hex, octal, binary and HTML values.

    ↑ ↓ to choose, Enter to open, Esc to close