GTM JSON Validator — Validate GTM Container Exports | Adslytics | Adslytics

📦

GTM JSON Validator

Validate your GTM container export JSON structure

How It Works

1

Export your GTM container

In GTM, go to Admin → Export Container and download the JSON file.

2

Paste the JSON

Open the exported file and paste its contents into the validator.

3

Review the analysis

See a summary of all tags, triggers, and variables, plus any structural issues.

GTM JSON Validator

What Is a GTM Container Export and Why Does It Matter?

A Google Tag Manager container export is a JSON file containing every tag, trigger, variable, folder, and built-in variable in your GTM workspace. It serves as a backup, a migration tool, and a version control artifact. This GTM JSON validator parses the export and verifies its structure before you attempt an import — catching corrupted or manually-edited JSON that would otherwise cause a silent import failure.

Common Reasons GTM Container Imports Fail

  • Manual JSON editing breaks internal reference IDs. GTM uses numeric accountId, containerId, and tagId fields to link tags to triggers. Editing these manually breaks the reference graph.
  • Deleted built-in variables still referenced. If a tag\'s firing rule references a built-in variable not enabled in the target container, the tag will never fire correctly.
  • JSON syntax errors from copy-paste. Opening in a basic text editor can introduce BOM characters or encoding changes that break JSON parsing.

Best Practices for GTM Container Version Control

  • Export after every major change. Store the JSON in a Git repository with a descriptive commit message.
  • Label exports by date and workspace. Use filenames like gtm-2025-06-22-v47.json to make restores unambiguous.
  • Test imports on a staging container first. Verify that the import preview shows the expected number of tags, triggers, and variables.

Frequently Asked Questions

A GTM container export is a JSON file containing all tags, triggers, variables, folders, and settings from a GTM workspace. It can be used to back up a container or migrate settings.
Yes — GTM allows you to import a container JSON into any container. Go to Admin → Import Container. You can merge with or overwrite existing configuration.
A valid GTM export contains an "exportFormatVersion" field, a "containerVersion" object, and nested arrays for tags, triggers, variables, and optionally customTemplates.
Technically yes, but it is risky. GTM uses internal reference IDs to link tags to triggers. Editing these incorrectly will break relationships.
Store the JSON file in version control (Git). Restore by importing in GTM Admin → Import Container → select the file.