Bracket and Tag Counter counts the opening and closing braces { }, parentheses ( ), square brackets [ ] and tags < > in your text or code. The counts update as you type, and a balance table shows which pairs are missing a closing or opening symbol. It is free and runs in your browser.
| Pair | Opening | Closing | Status |
|---|
if (x > 1) { ↵ items = [1, 2, 3]; ↵ print((a + b) ↵ }
Braces {}: 1 / 1 · Parentheses (): 3 / 2 · Brackets []: 1 / 1 · Tags <>: 0 / 1
Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.
A bracket and tag counter counts the opening and closing symbols of paired characters in your text: curly braces { }, parentheses ( ), square brackets [ ] and angle brackets < >, which are used for tags.
Every opening symbol needs a matching closing one. When the counts do not match, something is missing, which is a common cause of errors in code, JSON, spreadsheet formulas and math expressions.
The tool counts symbols only. It does not read the code, so symbols in strings, comments and operators such as => or <= are counted too. For full checking use a linter or your editor's bracket matching.
Each cell shows the number of opening symbols, then the number of closing symbols.
| Text | { } | ( ) | [ ] | < > |
|---|---|---|---|---|
function add(a, b) { return [a, b]; } | 1 / 1 | 1 / 1 | 1 / 1 | 0 / 0 |
<div><p>Hello</p></div> | 0 / 0 | 0 / 0 | 0 / 0 | 4 / 4 |
if (x > 1) { | 1 / 0 | 1 / 1 | 0 / 0 | 0 / 1 |
((a + b) | 0 / 0 | 2 / 1 | 0 / 0 | 0 / 0 |
Finding a missing closing brace or parenthesis in code, checking JSON and formulas, comparing the number of < and > in an HTML snippet and checking math expressions.
Symbols in strings, comments and operators such as => are counted too, and different kinds are not checked for correct nesting. Use a linter for a full check.
For the total count use Character Counter. To count the characters in each line use Count Each Line. To count words use Word Counter.
It counts the opening and closing symbols of four pairs: curly braces { }, parentheses ( ), square brackets [ ] and angle brackets < >, which are used for tags. Each symbol is counted separately, so you get eight counts.
Curly braces are { }, parentheses are ( ) and square brackets are [ ]. Angle brackets are < >, which are used for HTML and XML tags. In some countries the names are used differently, so this page names each symbol next to its count.
Open Tags counts every < and Closing Tags counts every >. A tag such as <div> adds one to each, and a closing tag such as </div> adds one to each as well. The tool counts the symbols, not the tag names.
Every opening symbol needs a closing one. A missing closing brace, bracket or parenthesis is a common cause of errors in code, JSON, formulas and math expressions. Comparing the counts is a quick first check.
It checks one thing beyond the totals: if a closing symbol appears before any opening symbol of the same kind, it says so and gives the line number. It does not check that different kinds are nested correctly, for example ( [ ) ].
Yes. The tool counts every symbol in the text, including those in strings, comments and operators such as =>, -> and <=. This can make the counts differ from what a compiler sees.
The balance table shows which kind is unbalanced and by how much. Then use the bracket matching in your code editor, or paste smaller parts of the code to find where the counts stop matching.
You can use it to compare the number of < and > symbols. It does not check tag names or whether each tag is closed, so use an HTML validator for that.
Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server. Still, avoid pasting passwords or other secrets into any web page.
Last updated: 25 October 2026