Home / Blog / JSON tools

JSON tools

FAQ JSON-LD: Model Questions Without Obsolete Search Claims

Create FAQPage JSON-LD from visible question-and-answer pairs, check pairing and escaping, and understand the retired Google FAQ search feature.

Separate the vocabulary from the retired search feature

FAQPage JSON-LD can describe a page containing frequently asked questions and their answers. Schema.org still defines that vocabulary. However, Google stopped displaying FAQ rich results starting 7 May 2026 and removed the old feature documentation in June. Generating FAQPage markup does not restore that retired Google Search feature.

This distinction matters when following an older tutorial. The official Google Search update records the change, while the Schema.org FAQPage definition describes the vocabulary itself. Decide whether you have a consumer or publishing requirement for the markup rather than expecting the old expandable search appearance.

Start with the questions the page actually answers

For a fictional local workshop, suppose the visible page answers whether a reservation is required and what participants should bring. Those are two separate questions with two corresponding answers. The following example represents those exact pairs without adding promotional claims or unrelated content.

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Is a reservation required?",
      "acceptedAnswer": {"@type": "Answer", "text": "Yes. Reserve a place before attending."}
    },
    {
      "@type": "Question",
      "name": "What should I bring?",
      "acceptedAnswer": {"@type": "Answer", "text": "Bring a notebook and a pen."}
    }
  ]
}

Check the first answer against the first question and the second answer against the second question. An answer that is correct elsewhere on the page is still wrong when attached to the wrong question. Preserve the wording and meaning a reader can find in the visible FAQ.

Do not use an FAQ wrapper merely because a page contains a question mark. A discussion thread where people submit competing answers has a different structure from a publisher-maintained FAQ. Choose a type that describes the actual page and the intended consumer's requirements.

Keep line-based input aligned

The local FAQ Schema Generator uses one question per line and one matching answer per line. Enter the two question lines in the question field and the two corresponding answer lines in the answer field. Inspect the generated mainEntity array before copying.

A blank answer must not silently shift the next answer upward. If the second question has no answer yet, finish that content before generating the pair, or remove both corresponding lines from the draft. Do not retain an unanswered question in a supposedly complete FAQ simply to increase the number of entries.

Long answers with intentional paragraph breaks do not map naturally to a one-line-per-answer interface. Prepare a reviewed JSON object directly or use a publishing interface designed for structured question-and-answer records. Do not insert extra newline characters that accidentally become additional answers.

Check the copied markup in its HTML context

The generated JSON-LD belongs in a script element with type application/ld+json when embedded in HTML. It is data, not a script to execute. Keep the ordinary visible FAQ on the page as well; a hidden data block is not a replacement for readable answers.

If an answer contains quotes, backslashes or text resembling an HTML closing script tag, serialization must preserve the answer without breaking the surrounding element. Use a safe JSON serializer and inspect the rendered HTML. A JSON parse check by itself cannot detect that an HTML parser terminated the script element early.

Test edits and ownership of the markup

Parse the generated object and assert that it contains two Question entries, each with an Answer whose text matches the corresponding visible answer. Then change only the second answer and confirm only that pair changes. Try an empty input and unequal question-and-answer counts so your publishing process cannot mistake stale output for a new result.

Check whether a CMS block or plugin already emits FAQ structured data. Keep one clear source of content so an editor changing an answer does not leave an older contradictory copy in another script block. If you intentionally retain multiple representations, verify they express the same facts.

Review the reason for maintaining the markup whenever its downstream consumer changes. Preserve the useful visible FAQ even if you stop generating a data representation for a retired feature; readers still need accurate answers and accessible navigation.