How to fix broken bold and italic in markdown
- Step 1Paste or drop your Markdown — Paste the draft, or drop a single
.mdfile. The cleaner accepts one Markdown input at a time (no batch on this tool). - Step 2Let it normalize emphasis — The fixed rule set runs immediately:
***x***becomes**_x_**,**__x__**becomes**x**, symmetric spaces are trimmed, and empty****/____are removed. - Step 3Scan the diff in your head — Compare against the original. Unmatched or unclosed markers are deliberately left in place — those are your cue that the source had a real typo to fix.
- Step 4Check code blocks survived — Confirm any triple-backtick fenced examples are byte-for-byte identical. Inline backtick spans are not protected, so review those by eye.
- Step 5Copy or download the result — Copy the cleaned Markdown back into your CMS or editor, or download it as a
.mdfile. - Step 6Re-run after later edits — If editors add new emphasis during review, paste the revised draft again — the rules are idempotent, so clean text passes through unchanged.
Every rewrite rule, in order
The cleaner applies these transformations sequentially to prose segments. Order matters — earlier rules can change what later rules see.
| Input pattern | Becomes | What it fixes |
|---|---|---|
***text*** | **_text_** | Triple-marker bold+italic split into explicit bold and italic |
___text___ | __*text*__ | Triple-underscore bold+italic split into explicit forms |
**__text__** | **text** | Redundant double-strong nesting collapsed |
****text**** | ***text*** then **_text_** | Quad markers; see edge cases — order produces ***_text_*** |
** text ** | **text** | Symmetric whitespace inside bold trimmed |
* text * | *text* | Symmetric whitespace inside single-asterisk italic trimmed |
____ (bare) | (removed) | Empty quad-underscore run deleted |
**** (bare) | (removed) | Empty quad-asterisk run deleted |
What it does NOT touch
These are intentional non-actions. The tool is a normalizer, not a balancer — knowing the gaps prevents false expectations.
| Case | Behaviour | Where to fix it |
|---|---|---|
** bold** (one-sided space) | Left unchanged — trim needs spaces on both sides | Fix the asymmetric marker by hand |
**unclosed | Left unchanged — no marker balancing | Manually close the marker |
Inline code ` x | Rewritten — backtick spans are not protected | Move code into a fenced block to protect it |
| 4-space indented code | Rewritten — only triple-backtick fences are detected | Convert to a fenced block first |
**already clean** | Unchanged — rules are idempotent | No action needed |
Tier limits for the Bold/Italic Cleaner
Markdown-family limits. The character limit is separate from the byte size — long single-line drafts can hit charLimit before fileBytes.
| Tier | Max file size | Max characters | Files per run |
|---|---|---|---|
| Free | 1 MB | 500,000 | 1 |
| Pro | 10 MB | 5,000,000 | 10 |
| Pro-media | 50 MB | 20,000,000 | 50 |
| Developer | 500 MB | Unlimited | Unlimited |
Cookbook
Real before/after Markdown from editorial drafts. Each block shows the source on top and the cleaner's exact output below.
Standfirst with triple emphasis
AI-written intro paragraphs frequently wrap a lede in ***. The cleaner splits it into explicit bold and italic.
Before: This is ***the single most important fact*** in the piece. After: This is **_the single most important fact_** in the piece.
Double-strong note collapsed
Dictation and rich-text paste often produce a strong span wrapped in another strong span.
Before: **__Editor's note:__** revisit this quote. After: **Editor's note:** revisit this quote.
Padded emphasis that wouldn't render
Symmetric spaces inside markers stop emphasis from rendering. Trimming restores it.
Before: The verdict is ** decisive ** and final. After: The verdict is **decisive** and final.
Stray empty markers removed
Deleted text can leave behind orphan marker pairs. Empty quad runs are removed outright.
Before: The quote **** was cut during the edit. After: The quote was cut during the edit.
Code fence left alone
A triple-backtick example containing emphasis-like syntax passes through unchanged while the surrounding prose is normalized.
Before: See ***below***: ```md Headline ***draft*** ``` After: See **_below_**: ```md Headline ***draft*** ```
Edge cases and what actually happens
Quad asterisks `****text****`
By designThe ***...*** rule fires before the ****...**** rule, so ****bold**** becomes ***_bold_***, not **bold**. Review quad-marker spans manually if you want plain **bold**.
One-sided space `** bold**`
PreservedThe whitespace-trim rules require a space on both sides (\s+...\s+). A space only after the opening marker is left untouched — fix it by hand.
Unclosed marker `**only open`
PreservedThere is no marker-balancing logic. An opening ** with no close is left exactly as written so the typo stays visible to the editor.
Inline code `` `** x **` ``
ModifiedInline backtick spans are not protected. The space-trim rule runs inside them, turning ` x into x `. Use a fenced block to protect literal emphasis examples.
Indented (4-space) code block
ModifiedOnly triple-backtick fences are detected. A 4-space-indented code block is treated as prose and its emphasis-like markers are rewritten.
Deleting `****` removes a separator
ExpectedBecause empty markers are deleted, a **b** and **** becomes a **b**and — the surrounding space collapses. Add a space back if the adjacency reads wrong.
Inner double spaces inside markers
Preserved** multi space ** becomes **multi space**: only the outer padding is trimmed; interior double spaces remain.
Five-asterisk run `*****text*****`
NormalizedThe inner ***...*** match dominates, producing **_text_**. The result renders as bold+italic — confirm that was the intent.
Already-clean Markdown
UnchangedWell-formed **bold** and *italic* pass through untouched. The rules are idempotent, so re-running never degrades clean text.
File over your tier's char limit
RejectedFree is capped at 500,000 characters and 1 MB. A long single-line draft can exceed charLimit before the byte size — split it or upgrade the tier.
Frequently asked questions
What exactly does this tool change?
It rewrites ***text*** to **_text_**, ___text___ to __*text*__, collapses **__text__** to **text**, trims symmetric whitespace inside double and single markers, and deletes empty **** and ____ runs. Nothing else.
Does it fix unmatched or unclosed markers?
No. There is no marker-balancing logic. An opening ** without a matching close is left exactly as written. Use the visible leftover as a cue to fix the source.
Are `***text***` and `**_text_**` different?
They render identically as bold+italic. The cleaner standardises on **_text_** because the explicit form is unambiguous across renderers.
Will `** bold**` with one stray space get fixed?
No. Trimming requires whitespace on both sides of the content. A one-sided space is preserved so you can correct the asymmetric marker yourself.
Is inline backtick code protected?
No. Only triple-backtick fenced blocks are detected and passed through. Emphasis-like syntax inside inline ` code ` spans will be rewritten.
Are fenced code blocks safe?
Yes. Content between triple-backtick fences is passed through byte-for-byte, so a ***draft*** inside a fenced example is never changed.
What happens to `****text****`?
Because the *** rule runs first, ****text**** becomes ***_text_***, not **text**. Review quad-marker spans by hand if you need plain bold.
Does running it twice cause drift?
No. The rules are idempotent — once text is normalized, a second pass leaves it unchanged.
Is my draft uploaded anywhere?
No. The cleaner runs entirely in your browser. Pasted manuscript text never leaves the page, which suits embargoed editorial drafts.
Can I clean several articles at once?
Not on this tool — it takes one Markdown input per run. To combine many files first, use the Markdown merger, then clean the result here.
It left literal asterisks in my output — why?
Either the markers were unmatched (not balanced by this tool) or the spacing was one-sided. Both are intentionally preserved. Fix the source marker and re-run.
What if I also have broken lists or tables?
This tool only touches emphasis. For lists use the list fixer, for pipe tables use table repair, and for general tidy-up run the prettifier or linter.
Privacy first
All Markdown processing runs locally in your browser using JavaScript. No file is ever uploaded to JAD Apps servers — only metadata counters are saved for signed-in dashboard stats.