Converting # Hi and Hello into HTML
The source is a line # Hi, a blank line, and Hello. Press Convert to HTML. The headline reads HTML. The label above the headline reads Converted. The result is an h1 element whose text is Hi, then a paragraph element whose text is Hello. Written as tags, that is an opening h1, Hi, a closing h1, a line break, an opening p, Hello, and a closing p. Characters is 24, which is the length of that HTML. The steps are escape raw HTML, turn headings, lists, and paragraphs into tags, and apply bold, italic, and code inside a line. Raw HTML in the source is escaped. The page does not fetch a page.
The subset is headings of one to three marks, paragraphs, bold wrapped in a pair of asterisks, italic wrapped in one asterisk, code wrapped in backticks, and dash lists. A heading line is one, two, or three # marks, then a space, then the heading text. # Hi is an h1. ## Hi would be an h2. ### Hi would be an h3. A line that starts with a dash and a space is a list item. A blank line ends a list. Other non-empty lines become paragraphs. The sample uses the heading and, after the blank line, the paragraph Hello.
The source must be from 1 to 20000 characters. Empty text, or text longer than 20000 characters, is refused with Enter from 1 to 20000 characters. If the conversion leaves no text, the page says Enter Markdown that still has text. The button says Convert to HTML. Before you submit, the waiting line is Enter Markdown. Reset restores the sample: # Hi, a blank line, and Hello. Copy result copies the HTML. The result text is <h1>Hi</h1> then a newline then <p>Hello</p>. The page does not open that fragment in a browser, and it does not save a file.
A line of four # marks is not a heading in this subset. #### Four becomes a paragraph that still shows the marks. #Hi with no space after the mark is a paragraph too, because a heading needs the space. A dash list of two items, a line - a and a line - b, becomes a ul with two li elements, and Characters for that list is 29. Bold, italic, and code can sit inside a paragraph or a heading or a list item. They are applied after the raw HTML is escaped, so a typed tag is not a live tag.
What the Sample HTML Is
The sample result is two blocks. The first is an h1 whose text is Hi. The second is a paragraph whose text is Hello. A newline sits between the blocks. Characters 24 counts the tags, the text, and that newline. The headline is the word HTML on every successful conversion. The useful record is the result text, not the headline alone. The label Converted names the panel. The page escaped nothing in the sample because # Hi and Hello contain no raw tags. It still runs the escape step first, then the block step, then the inline step.
The subset stops at headings of one to three marks, paragraphs, bold, italic, code, and dash lists. A line that starts with an asterisk and a space is also taken as a list item, by the same rule as the dash. There is no table, no image, no link syntax, and no block quote in this converter. Those lines become paragraphs, with their marks left as text, unless they happen to match a heading or a list. The page does not fetch a page to fill in a missing image. It converts the paste.
How # Hi and Hello Convert
The first line is # Hi. One mark and a space make an h1, and the text is Hi. The blank line ends any list, and there is no list yet. The next line is Hello, which is not a heading and not a list item, so it becomes a paragraph. The result is the h1, a newline, and the paragraph. Characters is 24. If you remove the blank line and leave Hello directly under # Hi, the blocks are still an h1 and a paragraph, because each of those lines has its own rule. The blank line matters when you are closing a list. The steps stay in order: escape raw HTML, turn headings, lists, and paragraphs into tags, and apply bold, italic, and code inside a line.
The opposite direction starts from tags. The HTML to Markdown converts a small HTML fragment to Markdown. A paragraph Hello becomes Hello. An h1 Hi becomes # Hi. The tags it reads include h1, h2, h3, p, strong, em, code, a, ul, ol, and li. A script, a document type, and a javascript link are rejected. The page does not fetch a page. Use it when you already have the tags and you want Markdown. Use this page when the source is # Hi, a blank line, and Hello, and you want the h1 and the paragraph.
Markup the Converter Will Not Fetch
The page converts the paste. It does not load a URL, read a repository, or apply a stylesheet. If the Markdown mentions a file name, that name is text. The page does not open the file. A source longer than 20000 characters is refused with Enter from 1 to 20000 characters before any tag is built. Shorten it. A box that is empty after trimming gets the same refusal. The separate message Enter Markdown that still has text is for a conversion whose text content is empty. The sample is nowhere near that case. It has Hi and Hello.
Raw HTML is escaped, not executed and not stripped of its letters. A source that is a b tag around Hi becomes a paragraph whose text shows the tag as escaped text. The angle brackets are visible as text in the result, not as a live element. That is the escape step. The page does not then try to interpret the escaped tag as Markdown structure. A script tag typed as text is escaped the same way. This converter does not have a separate rejection for a script the way the HTML-to-Markdown tool does. It escapes, then converts the lines it recognizes.
Conversions You Can Recompute
Convert the sample and confirm an h1 of Hi, a paragraph of Hello, and Characters 24. Add a line that says **bold** and *italic* and `code` as its own paragraph. The paragraph should contain a strong element, an em element, and a code element around those words. Replace the body with two dash lines, - a and - b. The result should be a ul with an li for a and an li for b, and Characters should be 29. Type #### Four and confirm a paragraph that still shows the four marks. Type #Hi with no space and confirm a paragraph. Type a b tag around Hi and confirm the brackets are escaped inside a paragraph. Clear the box and confirm Enter from 1 to 20000 characters. Reset and convert once more so the sample HTML is the last result.
Removing spaces from HTML you already have is a different rewrite. The HTML Minifier removes extra spaces from a fragment. A p tag, a line break, Hi, and the closing tag becomes a single p element whose text is Hi. Comments are removed. A script and a document type are rejected. The page does not fetch a page. It does not turn # Hi into an h1. Use it when the paste is already HTML and you want it tightened. Use this page when the paste is Markdown and you want the tags created.
Limits of the Subset
Headings stop at three marks. A fourth mark stays in a paragraph. A heading needs a space after the marks. Bold is a pair of asterisks around text that itself has no asterisk. Italic is a single asterisk around text that has no asterisk. Code is a backtick pair. The page applies code, then bold, then italic, on one line, after escaping. It does not span those marks across a line break. A list item is a dash or an asterisk, then a space, then the item. Items in a row become one ul. A blank line, a heading, or a paragraph ends the list before the next block.
Mistakes That Miss the h1
The common miss is to omit the space in # Hi. #Hi is a paragraph. Another miss is to use four marks and expect an h4. The subset is one to three marks, so #### Four is a paragraph. Another miss is to expect a typed b tag to become a live element. Raw HTML in the source is escaped. Another miss is to expect a blank line to be required between # Hi and Hello. Each of those lines converts on its own. The blank line is how a list closes. Another miss is to expect links and images. They are not in the subset. A sixth miss is to read Characters 24 as the length of the Markdown. It is the length of the HTML, tags included.
Pretty printing a JSON value is a different indentation. The JSON Prettifier formats JSON with line breaks and indentation. {"a":1} becomes a readable object that still contains a and 1. The page says Enter valid JSON when the text is not JSON. It does not fetch JSON, and it does not turn # Hi into an h1. Use it when the paste is JSON and you want it broken onto lines. Use this page when the paste is the Markdown sample and you want the h1 and the paragraph.
Using the Converted HTML
Paste the Markdown, press Convert to HTML, and read the result as tags before you copy it. For the sample, find the h1 with Hi and the paragraph with Hello, and check Characters 24. If a heading became a paragraph, look for a missing space or a fourth mark. If a list broke into separate lists, look for a blank line between the items. If a tag you typed is visible as text, that is the escape step working. Bold, italic, and code should show as strong, em, and code only when the asterisks and backticks were paired on one line.
Reading the h1 and the Paragraph
Read the sample in this order. The headline is HTML. The label is Converted. The text is the h1 for Hi, a newline, and the paragraph for Hello. The line is Characters 24. The steps are escape raw HTML, turn headings, lists, and paragraphs into tags, and apply bold, italic, and code inside a line. A refusal is not an empty document you should publish. Enter from 1 to 20000 characters and Enter Markdown that still has text mean there is no HTML to record. Write the source beside the result. Copy result copies the HTML, not the # Hi line. The escaped form of a raw tag is part of the result when you typed a tag, so record that as text, not as a live element.
Indenting an XML document is a different tree. The XML Formatter indents an XML document. An a element wrapping a b element wrapping Hi is formatted with each element on its own line. The page does not fetch a file and does not accept a document type. It does not treat # Hi as a heading. Use it when the paste is XML. Use Characters 24 here when the source was the Markdown sample and the result is the h1 and the paragraph.
What the HTML Does Not Include
The result does not include a document type, a head, or a stylesheet. It is the fragment this subset can build from the paste. You chose the lines. The page escaped raw HTML, made # Hi into an h1, made Hello into a paragraph, and counted 24 characters. A dash list would have become a ul. A fourth heading mark would have stayed in a paragraph. The page cannot know whether you wanted a feature outside the subset. It will not fetch a page to supply one.
Checks on the Sample Source
Convert the sample and confirm the h1, the paragraph, and Characters 24. Remove the space after the mark and confirm #Hi becomes a paragraph. Add a fourth mark and confirm the line stays a paragraph. Convert - a and - b and confirm one ul with two items and Characters 29. Type a raw b tag and confirm the brackets are escaped. Put **bold**, *italic*, and `code` on a line and confirm strong, em, and code. Clear the field and confirm Enter from 1 to 20000 characters. Reset and convert once more so the sample is the last HTML.
Squeezing a CSS rule is a different character walk. The CSS Minifier removes comments outside quotes and extra spaces. a { color: red; } becomes a{color:red;}, and Characters there is 13. The page does not check that the CSS is valid. It does not turn # Hi into an h1, and it does not escape Markdown. Use it when the paste is CSS. Use this page when the paste is the Markdown subset and the result should be the h1 and the paragraph.