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

    Last checked by the TextEditor.com team

    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.

    Everything runs in your browser. The text is not sent to our server, and it is saved in this browser so it is still here tomorrow.

    What is Markdown?

    Markdown is a way to write formatted text with plain characters. A hash sign at the start of a line makes a heading. Asterisks around a word make it bold. A hyphen starts a list item. The file is still plain text, so any editor can open it, and it reads fine even without a preview.

    John Gruber published Markdown in 2004, with help from Aaron Swartz. It came with a short Perl script that turned the text into HTML. The original rules left many questions open, so every tool answered them a little differently. In 2014 a group of developers wrote CommonMark, a precise spec with over 600 test cases. GitHub built its own version on top of it, called GitHub Flavored Markdown (GFM), which adds tables, task lists and strikethrough. This editor follows CommonMark and adds the GFM extras.

    The ten rules that cover most of Markdown

    You can learn most of Markdown in a few minutes. Click a rule to load it into the box, then change the text and watch the result.

    Ten rules, with a box to try them
    Result

    Title

    Section

    Smaller heading

    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

    Everything else, like footnotes and escaping, is in the Cheat sheet button above the editor.

    Common Markdown mistakes

    Most Markdown problems come from spaces and blank lines. The table shows the five that come up most. 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 too. If a table needs merged cells or an image needs a set width, write that part as HTML tags inside the Markdown. The preview here removes scripts and event attributes 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 every project on its front page, and it renders issues and comments the same way. Note apps like Obsidian, Bear and Joplin store each note as a .md file, so your notes stay readable without the app. Static site builders like Hugo, Jekyll and Astro turn a folder of .md files into a website.

    Many chat and forum sites take Markdown too, with their own small differences. Reddit, Discord and Stack Overflow all read asterisks for bold or italic and backticks for code. Slack uses a similar but not identical set of marks. When a site ignores one of your marks, check its help page for the details.

    Tables in Markdown

    Tables are not part of the original Markdown or CommonMark. They come from GFM, and most tools support them now. Pipes separate the cells, and a row of hyphens under the first row marks it as the header. A colon at the left or right end of the hyphens sets the alignment of that column.

    Lining up the pipes by hand is slow once a table has more than a few rows. The Markdown table generator builds the text from a grid, or from a pasted spreadsheet, and you can paste the result here.

    Export options and where the text is saved

    Save .md writes a Markdown file. In Chrome and Edge the first save asks where to put the file, and later saves write to the same file, like a desktop editor. Other browsers download a new copy each time.

    Download as .html gives you a complete web page with a small style sheet that follows your light or dark system setting. Copy HTML puts only the HTML of the preview on the clipboard, ready for a blog editor or a CMS. Copy formatted copies the preview as rich text, so you can paste it into Word, Google Docs or an email with the formatting kept. For a PDF, pick PDF in the Download menu: the browser prints only the preview, and you choose "Save as PDF" as the printer.

    The text is saved in this browser about half a second after each change, in a store called IndexedDB. It stays on your device. Clearing the browser data removes it, so save a file before you do that. The same works in the plain text editor and the code editor on this site.

    Markdown has a long history and many flavors. The Wikipedia article on Markdown lists the main ones and the tools that use them.

    Tools that go with Markdown

    Frequently asked questions

    Is this Markdown editor free? Do I need an account?

    It is free, with no account and no sign up. Ads on the page pay for the site.

    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.

    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.

    Can I save the result as a PDF?

    Yes. Pick PDF in the Download menu. The browser opens its print dialog with only the preview on the page. Choose "Save as PDF" as the printer.

    Where is my text saved?

    In this browser, on your device, after each change. Nothing is uploaded. To keep a copy outside the browser, use Save .md or one of the download options.

    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. For placeholder paragraphs or list items in Markdown, use the lorem ipsum generator.

    • Text editorWrite and edit plain text in your browser.
    • 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 128 ASCII codes with decimal, hex, octal, binary and HTML values.

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