Developer guide
Markdown Syntax Guide for Beginners
Markdown is a lightweight way to add structure and emphasis to plain text using characters such as #, * and backticks. Learn a few core patterns, then preview your document in the place you plan to publish it.
By FreeToolsNexus Team · Last updated
Try the tool
- Markdown Editor with Live Preview A fast, distraction-free online Markdown editor with live preview, a formatting toolbar, and one-click export — your text never leaves your browser.
- Markdown to PDF & HTML Converter Use this Online Markdown Converter to turn Markdown files into a styled PDF or standalone HTML document in your browser.
- PDF to Markdown Converter Extract editable Markdown from text-based or scanned PDFs locally, with optional OCR and image export.
- JSON Formatter & Validator Beautify, minify and validate JSON with clear error messages — nothing is uploaded.
- JSON to YAML Converter Convert structured JSON into readable YAML for config files, deployment manifests, and developer tooling.
- Text Diff Checker Compare revisions of documents, code, or configuration files and inspect every change privately in your browser.
What Markdown is and why it is useful
Markdown is a lightweight syntax for structuring plain text. A few familiar characters create headings, emphasis, lists, links and code, while the source remains readable even before it is rendered. Markdown files commonly use the .md extension.
It is useful for README files, technical documentation, notes and other writing that benefits from being easy to edit, compare and keep in version control. A renderer converts the syntax into HTML or another format. The original Markdown description left some behavior open, so CommonMark provides a more consistent core specification. GitHub Flavored Markdown (GFM) adds features such as tables, task lists and strikethrough. Because support varies, preview a document in its destination.
The core Markdown syntax
Headings
Start a heading with one to six # characters. More characters indicate a lower-level heading. Add a space after the hashes, use one main heading for the document title, and keep heading levels in order.
# Project notes
## Setup
### Requirements
A consistent hierarchy makes long documents easier to scan and helps assistive technology and search systems interpret the page structure when it is published as HTML.
Paragraphs and line breaks
A blank line separates paragraphs. A single newline inside a paragraph is usually rendered as a space. To force a line break without starting a new paragraph, end the line with two spaces or a backslash:
First line\
Second line
Bold, italic and strikethrough
Use one * or _ for italic text and two for bold. Three markers can combine both styles. Strikethrough with two tildes is a GFM extension.
*italic* and **bold**
***bold and italic***
~~removed text~~
Lists
Use -, * or + for unordered lists. For ordered lists, put a number and period before each item. Indent nested items consistently. GFM also supports task lists:
- Review the draft
- Check the examples
- Confirm the code block
1. Open the editor
2. Write the content
3. Preview the result
- [x] Write the draft
- [ ] Proofread
Renderers generally count ordered-list items from the first number, so the source numbers do not always need to be sequential.
Links and images
Put link text in square brackets and its destination in parentheses. An image uses the same pattern with an exclamation mark before the brackets:
[Markdown Editor](/tools/markdown-editor)

Choose link text that explains where the link leads. Give images meaningful alt text so people using screen readers can understand their purpose, and so the description can appear if an image does not load.
Blockquotes and code
Start a quoted line with >. Wrap a short code term in backticks. For longer examples, use three backticks on separate lines; adding a language name can enable syntax highlighting where the renderer supports it.
> Keep examples easy to read.
Run `npm install` to install dependencies.
```json
{"name": "Maya", "active": true}
```
When documenting JSON, check that the example is valid with the JSON Formatter & Validator. To display triple backticks inside another fenced block, use a longer fence around the outer example.
Tables and horizontal rules
Tables use pipes to separate columns and a divider row under the header. Colons in the divider row set alignment. Tables are supported by GFM, but are not part of core CommonMark, so preview them on the platform where the document will appear.
| Format | Purpose |
|:-------|:--------|
| JSON | Data |
| YAML | Config |
For a horizontal rule, put ---, *** or ___ on a line by itself, with a blank line above it.
Escaping special characters
If a character would normally trigger formatting, put a backslash before it to show the character literally:
\*this is not italic\*
Markdown quick reference
| Element | Syntax |
|---|---|
| Heading | # Heading |
| Bold | **bold** |
| Italic | *italic* |
| Strikethrough (GFM) | ~~text~~ |
| Inline code | `code` |
| Link | [text](https://example.com) |
| Image |  |
| Blockquote | > quote |
| Bullet list | - item |
| Numbered list | 1. item |
| Task list (GFM) | - [ ] task |
| Horizontal rule | --- |
| Code block | Three backticks around the code, optionally followed by a language |
Writing Markdown for developer projects
README files and documentation
Markdown keeps project documentation in plain text, which makes it easy to read, edit and review alongside code. Draft in the Markdown Editor with Live Preview to see how headings, lists and code blocks render before committing the file.
YAML front matter
Some static site generators read page metadata from YAML placed between --- markers at the top of a Markdown file. This section is called front matter:
---
title: "Project notes"
date: 2026-10-09
tags: [markdown, guide]
---
If your metadata is in JSON, convert it with the JSON to YAML Converter. For a broader comparison of the formats and their trade-offs, see JSON vs XML vs YAML.
Comparing edits and cleaning up repeated text
Markdown is plain text, so you can compare document versions to review exactly what changed. The Text Diff Checker can help compare two drafts before publication.
For repetitive edits, a regular expression can transform matching text. For example, this pattern and replacement turn a bare URL on a line into a Markdown link:
Find: ^(https?://\S+)$
Replace: [$1]($1)
Test bulk replacements on a copy first. A pattern that matches more than intended can alter text outside the target lines.
Converting and reusing Markdown
Use the Markdown to PDF & HTML Converter to prepare a document for sharing as HTML or PDF. The PDF to Markdown Converter can turn a PDF into editable text, but review the result: page layout, tables and multiple columns may not map neatly back to Markdown.
Common Markdown mistakes
- Leaving out the space after
#. Write# Title, not#Title. - Skipping blank lines. Add a blank line before a list or table so it is not interpreted as part of the preceding paragraph.
- Inconsistent list indentation. Use a consistent number of spaces for nested items.
- Expecting every newline to create a line break. Use a hard-break marker or a blank line when that is the intended layout.
- Leaving special characters unescaped. An asterisk or underscore in ordinary text can be interpreted as formatting; escape it or wrap the text in code.
- Forgetting to close a code fence. An unclosed fence can make the rest of the document render as code.
- Using a pipe inside a table cell without escaping it. Write
\|when a literal pipe belongs in a cell. - Assuming extensions work everywhere. Tables, task lists and other additions vary by renderer. Preview the final document in its destination.
- Relying on raw HTML. Some platforms limit or remove HTML inside Markdown.
Frequently asked questions
What is Markdown used for?
Markdown is used to write formatted text in plain files, including README files, documentation, notes, blog posts, forum posts and chat messages.
Is Markdown a programming language?
No. Markdown is a formatting syntax. A renderer reads it and produces HTML or another output format.
What is the difference between Markdown and HTML?
Markdown is a shorter, more readable way to write common formatting, and it can be converted to HTML. HTML offers more control over a page. Some Markdown renderers also allow limited HTML.
Do all platforms render Markdown the same way?
No. Headings, emphasis, lists and links are widely supported, but extensions and raw HTML support vary. Preview your document where you plan to publish it.
What file extension do Markdown files use?
The most common extension is .md. You may also see .markdown.
How do I add a line break in Markdown?
End a line with two spaces or a backslash to create a line break, or leave a blank line to start a new paragraph.
How do I make a Markdown table, and will it work everywhere?
Separate columns with pipes and add a divider row of hyphens below the header. Tables are a common extension such as GFM, not part of core CommonMark, so preview them on your publishing platform.
Can Markdown be converted to HTML or PDF?
Yes. A Markdown renderer can produce HTML, and conversion tools can create formats such as PDF. Review the output before sharing it.
Can I put HTML inside Markdown?
Some renderers allow raw HTML, but support and restrictions vary. Prefer Markdown syntax when it can express the content you need.
How do I check how my Markdown will look?
Preview it in the target platform or use the Markdown Editor with Live Preview. Rendering differences make a destination-specific check useful.
Try the tools in this guide
- Markdown Editor with Live Preview A fast, distraction-free online Markdown editor with live preview, a formatting toolbar, and one-click export — your text never leaves your browser.
- Markdown to PDF & HTML Converter Use this Online Markdown Converter to turn Markdown files into a styled PDF or standalone HTML document in your browser.
- PDF to Markdown Converter Extract editable Markdown from text-based or scanned PDFs locally, with optional OCR and image export.
- JSON Formatter & Validator Beautify, minify and validate JSON with clear error messages — nothing is uploaded.
- JSON to YAML Converter Convert structured JSON into readable YAML for config files, deployment manifests, and developer tooling.
- Text Diff Checker Compare revisions of documents, code, or configuration files and inspect every change privately in your browser.
Related guides
- How to Format and Validate JSON Online Learn to format, minify and validate JSON, fix common syntax errors, and convert it to CSV, YAML or XML using browser-based developer tools.
- JSON vs XML vs YAML: Differences and When to Use Each Compare JSON, XML and YAML with the same data in all three formats, a comparison table, common pitfalls and tips for converting between them.
- What Is Base64 Encoding? How It Works and When to Use It Base64 turns binary data into plain text so it can travel through text-only systems. See how it works step by step, its limits and common mistakes.
Related tools
- HTML Editor Edit HTML source and see the rendered page update as you type, with a sandboxed preview that blocks scripts and remote resources.
- Word & Character Counter Count words, characters, sentences and paragraphs in real time, with an estimated reading time.
- Text to ASCII Art Generator Turn short text into ASCII art banners with classic FIGlet fonts — recolor, copy, or download as text or PNG, privately in your browser.