FAQ JSON-LD Example: How to Build Valid Markup
Build valid FAQPage JSON-LD with a worked two-question example: generate the markup, paste it in, and check it against current Google rules.
Most FAQ pages are written for people and read by machines only by accident. The headings look like questions and the paragraphs look like answers, but nothing in the page says so in a form a search engine can rely on. FAQ structured data fixes that gap: a small block of JSON-LD that labels each question and its answer, in the page's own words, so parsers do not have to guess.
This guide builds a complete, valid example from scratch: two factual questions and answers, the matching JSON-LD generated with FBSubNet's free FAQ JSON-LD Schema Generator, and the checks that matter in December 2026 — including the fact that Google no longer shows FAQ rich results, so the markup earns you structure, not a search feature.
What FAQ structured data is
Structured data is a machine-readable description of what a page contains. For a FAQ page, the vocabulary comes from Schema.org and the container type is FAQPage. Inside it you list one or more Question entities, each with an acceptedAnswer of type Answer. That is the entire model: question, answer, repeat.
The markup is written in JSON-LD and placed inside a <script type="application/ld+json"> element. Google has recommended JSON-LD as the preferred format since 2017, and it is the only format worth using for new markup. The older serializations, Microdata and RDFa, clutter your HTML with attributes and break easily during theme updates. JSON-LD sits apart from the visible content, so a redesign does not silently destroy it.
The block can sit anywhere in the HTML — the head, the footer, or just before </body>. What matters is the relationship between the markup and the page: every question and answer in the JSON-LD must also appear as visible text on the same page, in the same words. Markup that describes content visitors cannot see violates Google's structured data guidelines. The worked example below generates the visible FAQ and the markup from the same two pairs, so they match by construction.
The three fields you must get right
@context: always"https://schema.org". It tells the parser which vocabulary the rest of the block uses.@type:"FAQPage"for the container,"Question"for each question,"Answer"for each accepted answer.mainEntity: the array of questions. Each question has aname(the question text) and anacceptedAnswerwith atextfield (the answer text).
A valid FAQPage needs nothing beyond the three fields above and at least one question — keep the first version minimal, since optional fields such as url and @id are where most syntax errors creep in.
What FAQ markup will and will not do in Google
Be honest about the payoff before writing a line of markup. FAQ schema used to buy extra space in Google's results: expandable questions and answers directly under a listing. That ended in stages. In August 2023, Google restricted FAQ rich results to well-known government and health sites. In May 2026, it stopped showing them for any site, and the following month it removed the FAQ rich-result documentation entirely. Current guides and generator tools agree: no site gets an FAQ rich result today.
Do not add FAQ schema to chase a rich result that no longer exists. Add it because a machine-readable list of your page's questions and answers is genuinely useful, and because it costs almost nothing once the visible FAQ already exists.
Never promise a client that FAQ markup will produce expandable results — that promise has been false for every site since May 2026. And do not treat the markup as a substitute for the visible FAQ: if the questions are not worth showing to visitors, they are not worth marking up either.
Build an example: two questions, valid markup
The demo below builds a real, working example with two factual questions about FAQ schema itself. Both are stated in plain text elsewhere in this article, so markup and visible content match by construction.
Step 1: Write the visible questions and answers first
Write the FAQ on the page before touching any code. Two questions are enough to prove the pattern; FBSubNet's generator accepts up to three pairs. Keep each answer to one or two sentences, direct answer first, and write the question exactly as a visitor would ask it, ending with a question mark.
The two pairs for this example:
- What is FAQPage structured data? FAQPage is a Schema.org type that marks a page's visible questions and answers in machine-readable JSON-LD, so search engines and other parsers can read them as question-and-answer pairs.
- Does adding FAQ schema guarantee a rich result in Google? No. Google decides what enhancements to show, and it stopped showing FAQ rich results in May 2026. The markup remains valid Schema.org and still labels your content for parsers.
Both answers restate facts made elsewhere in this article. Apply the same test to your own FAQ: if an answer in the JSON-LD cannot be found word for word on the page, rewrite one of them until they agree.
Step 2: Generate the JSON-LD
Open FBSubNet's FAQ JSON-LD Schema Generator, enter the two questions and answers exactly as written above, and select Run tool. The generator builds the script element for you and shows the output to copy. Because it runs entirely in the browser, nothing you type is uploaded.
The generated output for the two pairs above is:
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is FAQPage structured data?",
"acceptedAnswer": {
"@type": "Answer",
"text": "FAQPage is a Schema.org type that marks a page's visible questions and answers in machine-readable JSON-LD, so search engines and other parsers can read them as question-and-answer pairs."
}
},
{
"@type": "Question",
"name": "Does adding FAQ schema guarantee a rich result in Google?",
"acceptedAnswer": {
"@type": "Answer",
"text": "No. Google decides what enhancements to show, and it stopped showing FAQ rich results in May 2026. The markup remains valid Schema.org and still labels your content for parsers."
}
}
]
}
Read the block once before pasting it. Check that every question ends with a question mark, that each answer matches the visible text, and that the commas sit after every item except the last in each list — a missing comma is the most common reason a block fails validation.
Step 3: Add the script element to the page
Wrap the same JSON in a script element and place it in the page, near the FAQ section or just before </body>. Only the first and last lines change:
<script type="application/ld+json">
... the JSON-LD block from Step 2, unchanged ...
</script>
If your CMS has a dedicated field for structured data or custom code, use it rather than pasting into the article body — a field that adds its own script tags would double-wrap the block. In WordPress, a plugin such as Rank Math or Yoast can emit the same markup, but generating it by hand first teaches you what the plugin is doing, which makes its errors easier to diagnose later. Keep the two in sync: every edit to the visible FAQ needs a matching edit to the JSON-LD.
Test validity and eligibility
Validity and eligibility are two different checks, and a block can pass one while failing the other. Validity means the JSON parses and the types are used correctly. Eligibility means the markup follows Google's content rules. Test both before publishing.
Check the JSON syntax first
Before running any validator, confirm the block is valid JSON. Paste the object — without the script tags — into a JSON formatter, or run it through your browser's console with JSON.parse(). A trailing comma after the last item in an array or object is the error to look for; JSON forbids it, and it is the mistake most often made when adding a third question by hand.
Validate against Schema.org
Next, check the structure with the Schema.org validator at validator.schema.org. It confirms the types and properties are used correctly, independently of Google. A clean result means a parser can read the FAQ. Google's own Rich Results Test used to cover FAQ markup, but Google scheduled FAQ support to leave the test when it removed the FAQ rich-result documentation — so do not be surprised if the test reports no FAQ enhancement. That is the expected result in December 2026, not a failure of your markup.
Confirm the eligibility rules
Run through this short checklist against the published page:
- Visible match: every question and answer in the JSON-LD appears on the page, word for word.
- Real answers: each answer contains the actual answer, not just a link to another page. An answer that only says "see our pricing page" violates the guidelines.
- No promotion-only entries: questions must not exist only to advertise a product. "Why is our product the best?" is not a FAQ question.
- One FAQPage per page: do not add a second FAQPage block for the same questions, and do not copy one page's markup onto another page.
- Questions a visitor would ask: if a question has never been asked by a real person, it probably does not belong. FBSubNet's guide to turning real user questions into better FAQ content with AI shows how to build the list from support tickets.
Common mistakes that break FAQ schema
Most broken FAQ markup fails in one of three ways, and all three are content mistakes rather than code mistakes.
Marking up questions that are not on the page. This is the most frequent violation. A team adds questions to the JSON-LD that sound useful for search but never appear visibly. Parsers compare the two, and the mismatch is easy to detect. If a question is worth marking up, it is worth showing.
Answers that are links, not answers. An answer that contains only a link — "Read our returns policy" — is not an answer. Write the answer in full, then link to the detail page for readers who want more.
Treating the generator output as finished. A generator guarantees syntax, not truth. It will happily emit valid JSON-LD for a wrong answer. Read every generated pair against a source — your documentation, a settings page, or a tested step — before it ships. The same applies to AI-drafted answers: verify each one, because a confident answer with invented specifics is worse than no answer at all.
Frequently asked questions
Is FAQPage still worth adding if Google shows no FAQ rich results?
Yes, for the structure, not the search feature. The markup is valid Schema.org and gives any parser a clean list of the questions a page answers. It costs little once the visible FAQ exists. What it will not do is bring back the expandable results Google stopped showing in May 2026.
How many questions should a FAQPage block contain?
As many as the page genuinely answers, and no more. Two well-chosen questions beat ten padded ones. FBSubNet's generator handles up to three pairs, which suits a short FAQ; for a longer one, generate in batches and merge the mainEntity arrays, checking the commas at each join.
Putting it together
FAQ JSON-LD is one of the smallest structured-data jobs on a site: a FAQPage container, a list of questions, and an answer for each. The work that matters is not the code — it is writing questions real people asked, answering them from sources you can point to, and keeping the markup identical to the visible page. Generate the block from the same pairs you publish, check the JSON parses, and confirm the visible match. That is the honest case for FAQ schema in December 2026.