Skip to content
On this page
Fix Troubleshooting 2 min read Updated Sep 28, 2026

Block import fails with an invalid JSON error

In short

Checkout Ninja shows these errors when the file isn't a .json file, the JSON is broken, or the file came from the other import tool. Whole-block exports go into More actions → Import. Blocks-only exports go into the ⋯ menu → Import blocks, which needs a JSON array of blocks.

✓ Applies to

  • More actions → Import in the block editor
  • ⋯ → Import blocks next to Add block, including the Paste JSON tab

✕ Doesn't apply to

  • Blocks that import fine but don't show in checkout
Import worked but the block doesn't show at checkout? Go to that fix →

The file came from the other import tool

This is the most common cause. Checkout Ninja has two import tools, and each only reads its own kind of file.

Export made withImport it withFile starts with
More actions → Export (whole block)More actions → Import{
⋯ → Export blocks (blocks only)⋯ → Import blocks[

How to check:

  • In ⋯ → Import blocks, a whole-block file shows Found: 0 block(s). Clicking Import then shows Invalid JSON file format. If you pasted it into Paste JSON, you see Invalid JSON format.
  • In More actions → Import, a blocks-only file shows Found: 0 block(s), 0 rule(s). The import appears to succeed, but no blocks are added.

Fix: import the file with the matching tool from the table. For a blocks-only file, you can also open the file and copy the array into Paste JSON.

The JSON is broken

How to check: the error is Invalid JSON file format (uploaded file) or Invalid JSON format (pasted text). On the Paste JSON tab, the Import button stays greyed out and the help text reads “Paste a valid JSON array of blocks”. Common causes:

  • The file was edited by hand and has a trailing comma, a comment or single quotes.
  • Only part of the file was copied.
  • The file was saved by a word processor that changed the quote marks.

Fix: export the block again from the original store instead of editing the file. If you must edit it, run it through a JSON validator first.

The file isn’t a .json file

How to check: the error is Please select a valid JSON file.

Fix: use the file exactly as Checkout Ninja exported it, with its .json extension. If you renamed it or saved it as .txt, change the extension back to .json.

The blocks list in the file is empty

How to check: in ⋯ → Import blocks, the window shows Found: 0 block(s) for a blocks-only file, and importing gives Invalid JSON file format or Invalid JSON format. The file contains only [].

Fix: the block you exported had no blocks in it. Export again from a block that has blocks.

✓

A successful import shows a message such as 2 block(s) appended successfully or Data replaced successfully - Found: 2 block(s), 1 rule(s). Then click Save. The import isn’t stored until you do.

Frequently asked

What format does Paste JSON expect? +

A JSON array of blocks, starting with [ and ending with ]. That's what ⋯ → Export blocks produces. A whole-block export, which starts with {, won't work there.

Why is the Import button greyed out on the Paste JSON tab? +

The pasted text isn't valid JSON yet. While it's invalid, the help text under JSON content reads 'Paste a valid JSON array of blocks'.

Can I edit an exported file by hand? +

Yes, but keep it valid JSON. Trailing commas, comments and single quotes all make the import fail.

Related guides

Still stuck? Open the app and use Support to chat with the team, or contact us. Don't have the app yet? Install Checkout Ninja.