Block Pattern Checker
Paste WordPress block markup to check that every block comment is opened, closed, and nested correctly. Runs entirely in your browser.
About the Block Pattern Checker
The Block Pattern Checker validates WordPress block markup, the HTML comments that wrap every block such as <!-- wp:paragraph --> and <!-- /wp:paragraph -->. Paste the markup from the WordPress code editor or a pattern file and the tool confirms that each block is opened, closed, and nested correctly. It is built for theme and pattern developers who hand-edit serialized block content and need to catch broken markup before it reaches the editor. Everything runs in your browser, so your markup is never uploaded or logged.
How it works
- Paste your block markup into the input area, or click Load sample to try one with built-in errors.
- Click Validate (or press Ctrl/Cmd+Enter) to parse the markup.
- Read the summary, the list of any mismatched, unclosed, or unexpected blocks with their line numbers, and the nested block tree.
- Fix the reported lines in your source, then validate again. Use Copy report to save the results.
Features
- Checks that every block comment is opened and closed and reports unclosed or unexpected closing tags.
- Detects mismatched and incorrectly nested blocks and names the expected block and its opening line.
- Lists every block found as a nested tree with line numbers, marking unknown names.
- Validates the JSON attributes inside block comments and flags unknown core block names.
- Runs entirely client-side with line and column reporting, no accounts and no upload.
Frequently asked questions
What input does this tool expect?
Serialized WordPress block markup, the kind you see in the editor's Code view or in pattern PHP files. Each block is wrapped in HTML comments like <!-- wp:heading --> ... <!-- /wp:heading -->. Paste that markup and the tool checks the structure.
What does it check for?
It checks that every opening block comment has a matching closing comment, that closing comments are not orphaned, and that blocks are nested in the right order. It also validates the JSON attributes on each block and reports the line where each problem occurs.
Why is a block reported as unknown?
Block names without a namespace are matched against the list of core WordPress blocks. A name that is not on that list is flagged as unknown. Plugin and theme blocks should include a namespace, for example wp:acf/my-block, and those are accepted without warning.
Is my markup sent to a server?
No. Parsing and validation happen entirely in your browser. Nothing is uploaded, stored, or logged.
Does it change or fix my markup?
No. This tool only reports issues so you can fix them in your source. It does not rewrite or auto-correct your input.