Markdown Editor

Words—
Characters—
Lines—

How Markdown Editor is calculated: Headings (#, ##, ###), bold (**x**), italic (*x*), inline code (`x`), links ([t](u)), and unordered lists (- item) convert to HTML; other lines become paragraphs.

What is a markdown editor?

A markdown editor lets you write in markdown — plain text with a few simple marks for headings, bold, italic, and lists — and see the HTML it turns into. Type a hash and a heading, two stars and bold text, and the editor converts it at once. The default text on this page is a short shopping list: a heading, a line with bold, italic, and code, two list items, and a link — 17 words, 125 characters, and 8 lines. When you need the finished HTML on its own, the markdown to HTML converter produces it, and the HTML to markdown converter goes the other way.

The need comes up whenever writing has to end up as a web page. Blog posts, readme files, documentation, and notes are all written in markdown because it is faster than writing HTML by hand and easier to read than raw HTML. A writer types plain text with marks, and the editor does the conversion.

This editor shows two things at once: the HTML output in the box below, and a live rendered preview underneath it, so you can see the formatted result as you type. Everything runs in your browser — your text never leaves your device, nothing is stored, and there is no account to create.

How a markdown editor works

The editor reads your text line by line and turns each line into HTML. A line starting with one hash becomes a level-one heading, two hashes a level-two heading, and three hashes a level-three heading. A line starting with a dash or a star becomes a list item, and consecutive list items are grouped into one list. Any other non-empty line becomes a paragraph.

Inside a line, the small marks are converted too. Two stars around words make bold text, one star makes italic, backticks make inline code, and square brackets plus round brackets make a link. The default text shows all of them: Buy **milk**, *bread*, and `eggs`. becomes a paragraph with milk in bold, bread in italic, and eggs in code.

Before any of that happens, the text is escaped — less-than and greater-than signs are turned into safe entities — so text you type can never break the page or run as code. The preview below the output uses the same conversion, so what you see in the preview is exactly what the HTML output describes.

Blank lines are the paragraph rule. Two lines of text with no blank line between them are two separate paragraphs in the output, because the editor turns each non-empty line into its own paragraph. A blank line between two blocks does not make a paragraph of its own — it is skipped — so the default text has 8 lines but only 4 blocks of output: a heading, a paragraph, a list, and a paragraph.

The marks that matter: headings, bold, italic, lists

Headings are the most used mark. One hash is the page title, two hashes is a section, and three hashes is a sub-section. The default text starts with # Shopping List, which becomes a level-one heading. A common mistake is forgetting the space after the hash — #Shopping List without a space is not a heading, it is plain text starting with a hash.

Bold and italic are the next marks. Two stars around a word make it bold, one star makes it italic, and backticks make inline code for commands and file names. The default text uses all three in one line, which is how real writing looks — a sentence with one bold word, one italic word, and one code word.

Lists are the third mark. A dash and a space at the start of a line makes a list item, and consecutive items group into one list. The default text has two items, Apples and Bananas, which become a two-item list. A word counter can check the length of the same text, and a JSON formatter tidies structured data the way this editor tidies prose.

A worked example: a shopping list in markdown

Take the default text exactly as it sits on the page: # Shopping List, a blank line, Buy **milk**, *bread*, and `eggs`., a blank line, - Apples, - Bananas, a blank line, and Visit [Sortrun](https://sortrun.com) for more tools. It is 17 words, 125 characters, and 8 lines.

The HTML output starts with <h1>Shopping List</h1>, then a paragraph with <strong>milk</strong>, <em>bread</em>, and <code>eggs</code>, then a list with two items, Apples and Bananas, then a paragraph with a link to Sortrun. The preview below shows the same thing rendered: a big heading, a sentence with bold milk and italic bread, two bullet points, and a clickable link.

Try a second one. Type ## Notes on the first line and - One on the second, and the output is <h2>Notes</h2> followed by a one-item list. Type a line with no marks and it becomes a plain paragraph. A case converter can fix the capitalisation of the same text before you convert it.

Who uses a markdown editor, and why

Bloggers and writers are the biggest users. A blog post written in markdown is plain text that any editor can open, and it converts to clean HTML for the site. A writer who types markdown never fights with a formatting toolbar, and the text stays readable even before it is converted.

Programmers are the second group. Readme files, documentation, and comments are all written in markdown, because code sites render it automatically. A programmer who writes a readme in markdown knows it will look right on the project page without writing any HTML.

Note-takers and students are the third group. Lecture notes with headings, bold key terms, and lists are easier to scan than flat paragraphs, and markdown is the fastest way to make them. The editor on this page handles all three uses — type, check the preview, copy the HTML — which covers most of what anyone needs.

Documentation teams are a fourth group, and they use markdown because it works in version control. A help page written in markdown shows clean differences when it changes, line by line, while a page written in a word processor shows a wall of changed formatting. The writer, the reviewer, and the site all read the same plain-text file, and the HTML is made from it at the end.

Markdown editor vs writing HTML by hand

Markdown and HTML do the same job, but markdown is faster to type and easier to read. A heading in markdown is # Shopping List; the same heading in HTML is <h1>Shopping List</h1>. A bold word in markdown is **milk**; in HTML it is <strong>milk</strong>. For a whole document, the saving adds up to minutes.

The same text-tools family on this site does the nearby jobs. A JSON formatter tidies structured data, a word counter measures the text, and a case converter fixes capitalisation before the text is converted.

The trade is control against speed. HTML can do anything — tables, classes, exact styling — and markdown on this page does the basics only. If you need a table, write the HTML by hand. If you need a heading, bold text, and a list, markdown is faster, and this editor shows you the HTML it makes so you can copy it anywhere.

Common markdown mistakes

The most common mistake is forgetting the space after the hash. # Shopping List is a heading; #Shopping List is plain text. The same rule holds for lists: - Apples is a list item, but -Apples is plain text. The mark needs the space to count.

Second: putting bold stars across a line break. Bold marks must open and close on the same line, because the editor converts one line at a time. A bold phrase split over two lines will not render, and the stars will show in the output instead.

Third: expecting advanced features that this preview does not render. The preview supports basic markdown — headings, bold, italic, code, links, and lists — and advanced features such as tables and footnotes are not rendered. A table written in markdown will show as plain text lines, not as a table.

Fourth: pasting HTML into the editor and expecting it to convert. This editor reads markdown, not HTML. Pasted HTML is escaped and shown as text, which keeps the page safe but does not render the tags. Write markdown in, get HTML out — that is the direction the tool works in.

How to use this markdown editor

Using this editor is simple. Type or paste markdown into the box, or start from the default shopping list. The HTML output appears instantly in the box below, with the word, character, and line counts shown above it. The live rendered preview sits underneath the output and updates as you type.

To try a mark, type it and watch the preview change — a hash for a heading, two stars for bold, a dash for a list item. To use the HTML somewhere else, copy it from the output box with the Copy button. To start over, select all, delete, and type the new text.

Everything runs in your browser. No sign-up, no account, no data sent anywhere — your text never leaves your device. It works offline once the page has loaded, so you can use it on a plane or anywhere else you write. Try it with something real before you need it: write your next note in markdown, check the preview, and copy the HTML.

Frequently Asked Questions

Basic markdown: headings with one to three hashes, bold with two stars, italic with one star, inline code with backticks, links in square brackets plus round brackets, and unordered lists with a dash or star. Advanced features such as tables and footnotes are not rendered — a table shows as plain text lines.

Because the hash needs a space after it. # Shopping List with a space is a level-one heading; #Shopping List without a space is plain text starting with a hash. The same rule holds for lists: - Apples is a list item, but -Apples is not.

Yes. Your text is escaped before conversion, so less-than and greater-than signs you type become safe entities and cannot run as code. The output is plain headings, paragraphs, lists, links, bold, italic, and code — nothing else.

Yes. Everything runs in your browser — your text is never uploaded, stored, or sent anywhere. You can use it offline once the page has loaded, and you can paste a draft post without worrying about who sees it.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.