← All text tools

Bracket Balance Checker

Paste code or JSON and find the unmatched or mismatched brackets, braces and parentheses with line and column numbers, skipping brackets inside strings and comments.

  • Free
  • No sign-up
  • Works on any device

About Bracket Balance Checker

A missing closing parenthesis can hide dozens of lines away from the error message. This checker scans your text with a stack and reports every bracket that is never closed, every closing bracket with nothing to close, and every pair that does not match, each with its line and column. In code mode it skips quoted strings and comments; JSON mode skips strings; Python mode skips strings, triple quotes and # comments; plain text mode counts everything. A count of each bracket type is shown too.

How to use Bracket Balance Checker

  1. Choose the mode that matches what you paste: code, JSON, Python or plain text.
  2. Paste the text and read the result line above the problem list.
  3. Go to the reported line and column, fix the first problem and recheck.

Why use this tool?

Also known as

Frequently asked questions

How does it decide which bracket is the problem?

Brackets must close in reverse order of opening. When a closer matches an earlier opener, every opener opened after that one is reported as never closed, which usually points at the real mistake.

Why are brackets in strings ignored?

A parenthesis inside a quoted string or comment is not part of the code structure. Choose plain text mode if you want every bracket counted, including those in strings.

Does it check HTML tags?

No. It checks round, square and curly brackets only. Angle brackets and tags are not matched, so use an HTML validator for tag errors.

Is Bracket Balance Checker free?

Yes. Bracket Balance Checker on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.