Skip to main content
CaseSwitch

Markdown Formatter

Use the CaseSwitch Markdown Formatter to normalize common Markdown spacing so a README or issue body diffs cleanly. Paste Markdown, review the result, and copy it. Formatting runs in this browser with Prettier’s Markdown parser — nothing is uploaded.

Written by the CaseSwitch editorial team. We maintain these tools in the browser so drafts, keys, and images stay on your device.

Last reviewed: 23 July 2026

Processed locally in your browser. Nothing is sent to a server.

Paste or type text to convert. Output stays empty until there is input.

Character count: 0 · Word count: 0 · Line count: 0

Examples

Normalize list markers

Input

# Hello

* one
* two

Para

Output

# Hello

- one
- two

Para

Mixed heading and bullets

Input

# Hello World

This is a paragraph.

* a
* b

Output

# Hello World

This is a paragraph.

- a
- b

Format JS inside a fence

Input

Intro

```js
const x=1
```

Outro

Output

Intro

```js
const x = 1;
```

Outro

Blockquote plus paragraph

Input

> quote

para

Output

> quote

para

Links stay readable

Input

[a](https://x.com) and [b](https://y.com)

Output

[a](https://x.com) and [b](https://y.com)

How to use

  1. Paste Markdown into the input panel.
  2. Review lists, headings, and fenced code in the output.
  3. Copy the result and skim the git diff before you commit a large docs change.

What this tool is for

Chat pastes and hasty README edits often mix list markers and messy fences. This page reformats Markdown for consistency. It is not markdownlint in CI and not a CommonMark-to-HTML renderer — open preview in your editor for rendered output.

How it works

Prettier’s Markdown parser rewrites the document (print width and indent from options). List markers often normalize (`*` → `-`). Fenced code may be reformatted when Prettier recognizes the language tag (for example `js`). YAML front matter and MDX custom containers can surprise you — preview before committing.

When to use it

Cleaning a paste from a chat, unifying a docs snippet, preparing a GitHub issue, and normalizing list style before a PR.

When not to use it

Not a blog CMS. Not a full GFM spec implementation. Significant indentation in nested lists can still break if the source was already wrong — check the diff. Heavy MDX may need your editor.

How it compares to related tools

Markdown Table Generator builds tables from rows. HTML to Markdown goes the other direction. Word to Markdown starts from .docx.

Common mistakes

Formatting until a carefully indented list breaks. Touching YAML front matter accidentally. Assuming every fence is left byte-identical — language-tagged fences can be pretty-printed.

Lists and fences

Prettier often prefers `-` for unordered lists. Fenced blocks with a language tag may be passed through language-specific formatting (JavaScript inside ` ```js ` can gain semicolons and spaces). If a fence must stay exact, format around it or exclude the file from auto-format.

Front matter and MDX

YAML front matter and MDX syntax are easy to disturb. For blog posts with imports and JSX islands, prefer the project’s configured Prettier/MDX pipeline over a one-off paste here.

Frequently asked questions

Will this change my code fences?+

It can when a language tag is present and Prettier formats that language. Check the diff. Plain fences without a language are less likely to rewrite code.

Does it implement GFM?+

It is oriented toward common GitHub-flavored patterns via Prettier Markdown, not a complete GFM spec implementation.

Why did * become -?+

Prettier normalizes unordered list markers. Both are valid Markdown; pick one style for the repo.

Can I preview rendered HTML here?+

This page formats source text. Use your editor or GitHub preview for rendered output.

Is my Markdown uploaded?+

No. Formatting runs in this browser.

Will #Hello gain a space?+

Prettier Markdown does not always rewrite tight ATX headings like #Hello. Prefer writing `# Hello` yourself for readability.

Does this tool send my payload to CaseSwitch?+

No. Formatting, encoding, and naming conversions for this page run in your browser after load — your sample stays on the device.

Related tools