Minecraft Datapack And Mcfunction Syntax Linter Online

Validate Minecraft .mcfunction commands, target selectors, NBT brackets, JSON loot tables, and 1.21+ item component compatibility live in your browser with one-click safe auto-fixes.

Minecraft Datapack And Mcfunction Syntax Linter OnlineFree · No Install · Works On Desktop And Mobile
Tip: On a phone, rotate to landscape for extra workspace.Open Full Screen ↗

About This Tool

When a Minecraft data pack silently fails to appear after typing /reload, finding a single unclosed SNBT brace, trailing JSON comma, stray leading slash inside a .mcfunction file, or outdated Minecraft 1.20.4 selector key like radius=12 can waste hours of trial-and-error debugging.

Inspired by the open-source SpyglassMC language server, this online Minecraft Datapack And Mcfunction Syntax Linter checks your commands, target selector arguments, balanced braces/quotes, JSON loot tables or pack.mcmeta files, and Minecraft 1.21+ migration issues (such as minecraft:grass -> short_grass, legacy /give NBT braces vs item components, and plural functions/ references) in real time inside your browser.

  • Real-time .mcfunction validator catching invalid leading slashes, unknown root commands across all 90+ vanilla Java commands, unbalanced SNBT/JSON braces or quotes, and invalid target selector arguments (including legacy r=/radius= keys).
  • Strict Minecraft JSON linter for loot tables, recipes, predicates, advancements, and pack.mcmeta—pinpointing exact trailing commas and missing pack_format fields that cause silent pack failures.
  • Version-aware Minecraft 1.21+ vs 1.20.4 compatibility checker flagging deprecated item NBT syntax on /give and /item replace, renamed block IDs (grass -> short_grass), and singular function/ folder migrations.
  • One-click Auto-Fix Safe Issues button plus Export Lint Report .json download running 100% locally in your browser.

How To Use This Tool

  1. Inspect the preloaded Broken 1.21.4 .mcfunction sample—or switch the Sample dropdown to Loot Table JSON Error or Clean 1.21.4 Function—to see how line-numbered Error and Warning cards appear on the right.
  2. Select your target version (MC 1.21+ Components or MC 1.20.4 Legacy NBT) and format mode (Auto Detect, .mcfunction, or Datapack JSON).
  3. Paste your own commands or JSON into the left editor, or click Open File to load any .mcfunction, .json, or pack.mcmeta file directly from your computer.
  4. Click Auto-Fix Safe Issues to automatically strip leading slashes, upgrade legacy radius= selectors to distance=.., remove trailing JSON commas, and rename deprecated 1.21 IDs.
  5. Click Export Lint Report .json to save a structured diagnostic summary of every detected error and warning.

Tips And Best Practices

  • Never start lines with a leading / inside .mcfunction files—unlike chat or command blocks, Minecraft data pack functions require bare command names such as execute, give, or scoreboard.
  • When upgrading 1.20.4 data packs to Minecraft 1.21+, switch the Version selector to MC 1.21+ to spot every legacy /give item{...} NBT brace that must be migrated to square-bracket item components [...].
  • Always test JSON loot tables and pack.mcmeta files here before zipping your datapack: a single trailing comma before a closing bracket causes Minecraft to silently ignore the entire file.

Frequently Asked Questions

Why Does Minecraft Ignore My .Mcfunction File Even Though The Commands Work In Chat?

Two common culprits cause silent function failure: leading forward slashes (/give instead of give) and single syntax errors anywhere in the file (unclosed NBT braces, invalid selector arguments, or removed 1.21 block IDs), which cause Minecraft to abort loading the entire function.

Does This Linter Support Minecraft 1.21.4 Item Components And Singular Function Folders?

Yes. In MC 1.21+ mode it checks for legacy curly-brace item NBT syntax on /give and /item replace, flags renamed IDs such as minecraft:grass, and catches plural :functions/ references.

Which Open-Source Project Inspired This Online Datapack Linter?

This browser validator is inspired by SpyglassMC (MIT License), providing zero-install client-side .mcfunction and datapack JSON linting on 9Minecraft.