Short answer
Parse error means the parser couldn't read the text — it says nothing about whether the diagram makes sense. Paste the code into the editor and the error is reported in plain language with the line number. It's almost always one of four things.
1. The reserved word end
end closes a block in Mermaid, so it can't be a node label:
flowchart TD
A[Start] --> B[end]
Fix: use another word, or quote it — B["end"].
2. Mixed arrow styles
-->, -> and ==> in the same diagram, or a dash short:
flowchart TD
A --> B
B -> C
Fix: in a flowchart, use --> throughout. Sequence diagrams use ->> — the two syntaxes don't mix.
3. Full-width punctuation
If any of the text came from a CJK keyboard, the brackets, colons and commas may be full-width characters that look right but aren't. The reported line often looks fine — that's the tell. Structural punctuation has to be ASCII; punctuation inside a label can be anything.
4. Quotes or brackets inside a label
A[The "new" release] cuts the parser off. Fix: wrap the whole label — A["The new release"] — or drop the inner characters.
All four avoided
This one gets all four right — open it in the editor and compare:
flowchart TD
A[Start] --> B{Over 5,000?}
B -- Yes --> C["Director approves (with attachments)"]
B -- No --> D[Manager approves]
C --> E([Archived])
D --> EEdit the text, switch themes and download PNG, Word or PowerPoint from there.
Then check
The diagram re-renders as you type; the error bar disappearing means it parsed. If you still can't spot it, the error bar has an "AI fix" button that makes the smallest change needed and shows you a line-by-line diff before anything is applied.