The short answer
Mermaid's syntax characters must be plain ASCII: brackets, colons, semicolons, quotes and arrows. Punctuation inside a label can be anything. Errors appear when the characters that define a shape or a link are full-width or typographic variants.
Which characters to replace
| Breaks the code | Correct | Used for |
|---|---|---|
( ) 【 】 |
( ) [ ] |
Node shapes |
{ } |
{ } |
Decision diamonds |
: |
: |
Sequence messages, Gantt tasks |
; |
; |
End of a statement |
“ ” |
" |
Quoting text with special characters |
--> ——> |
--> |
Links |
A typical example
Three full-width characters stop this from rendering:
flowchart TD
A【Submit】 --> B{Approved?}
B --> C(Done)
With ASCII characters it works:
flowchart TD
A[Submit] --> B{Approved?}
B --> C(Done)Edit the text, switch themes and download PNG, Word or PowerPoint from there.
Hyphens that only look right
Dates and style names in AI replies sometimes use a non-breaking hyphen, which looks like - but is a different character: 2026‑10‑01, stroke‑width. A Gantt chart reports an invalid date and a flowchart reports an unrecognized character. Retype them with a plain -.
When a label needs brackets
To show ASCII brackets or quotes in a label, wrap the whole label in double quotes:
flowchart LR
A["Submit (with attachments)"] --> B["Review (1-3 business days)"]Edit the text, switch themes and download PNG, Word or PowerPoint from there.
Skip the hunt
Paste the code or the whole AI reply into the editor. Full-width brackets, colons, arrows and look-alike hyphens are detected, and "Fix it" in the status row replaces them all. Each error is explained in Common errors.