Recommended Free Tools
Mermaid does not treat every everyday word as a reserved keyword. It parses your text according to the grammar for the diagram type you declared, so a word can act as syntax in one position but work normally as a label elsewhere. A common example is lowercase end in a flowchart, which Mermaid documents as a diagram breaker.
Why an ordinary word can affect a Mermaid diagram
A Mermaid definition is source code for a particular kind of diagram, not unrestricted prose. Its opening declaration tells Mermaid which grammar to apply; that grammar determines which words and symbols have structural meaning. The syntax reference warns that unknown words and misspellings can break diagrams, and identifies end as a hazard in flowcharts and sequence diagrams. The warning is contextual: it does not mean every common word is reserved everywhere. Mermaid syntax reference
As an Amazon Associate I earn from qualifying purchases.
Why lowercase end breaks a flowchart
In a flowchart, Mermaid recognizes lowercase end as syntax rather than ordinary node text in certain contexts. The official flowchart guide warns that it can break the diagram. If you need the word as a label, use a quoted label or change its capitalization, such as End or END. Mermaid also documents a workaround for this case. Mermaid flowchart syntax
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFor example, make the intended label explicit with quotes:
flowchart TD
A["end"] --> B[Done]
Quoting is useful when a label contains text or characters Mermaid might otherwise interpret as syntax. The correct fix depends on where the troublesome text appears: syntax in a structural position cannot always be repaired in the same way as text inside a node label.
Not every apparent keyword problem is a word problem
In flowcharts, punctuation and neighboring characters can change how Mermaid reads a line. A lowercase o or x immediately after a link operator can be interpreted as a circle or cross edge rather than as the start of a node identifier. Add spacing or capitalize the letter to disambiguate the intended edge or label. Mermaid flowchart syntax
Rank #2
Keyword rules differ by diagram type
Do not assume that a word that causes trouble in a flowchart will behave identically in another diagram. Each diagram type has its own grammar. For example, Mermaid’s requirement-diagram documentation lists grammar keywords and warns that unquoted user text can fail if it is detected as another keyword. Mermaid requirement diagram syntax
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →When debugging, identify the declared diagram type and the exact position of the word first. Then check whether it is intended as structural syntax, a node or other label, or part of a link expression. That distinction is more useful than trying to compile a universal list of “reserved words”: the documentation does not establish an exhaustive list covering every diagram grammar.
Rank #3
How to find and fix the offending token
- Check the declaration. Read the first line and confirm which diagram grammar Mermaid is using.
- Locate the token and its position. Look at the precise word, punctuation, and neighboring symbols identified by the parser error; determine whether the text is syntax or a displayed label.
- Make labels explicit. For flowchart labels, quote text that could be read as syntax. For lowercase
end, capitalization is also an official recommendation; Mermaid’s flowchart guide documents an additional workaround. - Inspect link operators. If the problem involves a flowchart edge, check whether an adjacent lowercase
oorxis being parsed as edge notation. Try spacing or capitalization to clarify the intended reading. - Validate in the target environment. Test the exact source with the same Mermaid version or host application that will render it.
Validate source without rendering the diagram
Mermaid provides mermaid.parse(text, parseOptions) to check a graph definition without rendering it. For valid syntax, the API returns the diagram type; invalid input throws unless errors are suppressed. If you use an embedded application, its own parser or bundled Mermaid version is the relevant test, since the version used by that host may differ from the one in an online Mermaid tool. Mermaid usage and API
mermaid.parse(source);
Use the function in the environment where Mermaid is available, supplying your actual diagram source as source. A successful parse checks syntax; it does not render the diagram.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




