Skip to content
100% local

Bracket balance checker

Find unpaired brackets, quotes, backticks and HTML/XML tags in your text.

Input
Output

Bracket balance checker

Paste any code or text and this tool scans it for delimiters that never found their pair: round brackets, square brackets, curly braces, straight and typographic quotes, backticks, and HTML or XML tags. Every finding lists the exact line and column, which side is missing — opening or closing — and a short excerpt of that line with the spot marked, so you can jump straight to the problem instead of scanning the whole file by eye.

Turn individual checks on or off for whichever delimiters matter to you, and pick a language mode so the checker ignores content it shouldn't look inside: JavaScript mode skips string and comment bodies, JSON mode skips string values, and Markdown mode skips fenced code blocks and inline code spans. "Tolerate apostrophes inside words" stops a contraction like "don't" from being read as a stray quote. Turning on "Show nesting depth" appends how deeply nested each finding is, and "Show summary" adds a total count at the end.

Each bracket kind is checked independently, so a genuinely unclosed "(" is always reported even if every "[" and "]" elsewhere happens to balance out — this is a balance checker, not a full parser, so it won't catch a bracket closed in the wrong order if every individual kind still adds up. HTML checking treats void elements like "br" and "img" as self-closing automatically, and ignores anything inside an HTML comment. The tool handles both Windows (CRLF) and Unix (LF) line endings the same way.

Everything runs locally in your browser — nothing you paste is uploaded anywhere, which makes it safe to check private source code or drafts. Copy the report, download it as a .txt file, or send it back into the input after fixing an issue to re-check the rest.

FAQ

Does it check that brackets are nested in the right order?
No. Each bracket kind — round, square, curly, quotes, backticks, tags — is balanced on its own, so a truly unpaired delimiter is always caught, but interleaving like "([)]" where every kind still balances individually is not flagged.
What does "language mode" change?
It decides which regions are skipped before checking: JavaScript mode ignores string and comment bodies, JSON mode ignores string values, and Markdown mode ignores fenced code blocks and inline code spans. Plain text mode checks everything as-is.
How are HTML void elements like <br> or <img> handled?
They are treated as self-closing automatically and never reported as missing a closing tag, whether or not you write the trailing slash.
Why is an apostrophe inside a word sometimes ignored?
With "Tolerate apostrophes inside words" on, a straight or curly apostrophe surrounded by letters — as in "don't" — is treated as punctuation, not a quote mark, so it is not counted toward quote balance.
Is my text or code uploaded anywhere?
No. The check runs entirely in your browser — nothing you paste ever leaves your device.