---
name: faq-schema-generator
description: "Writes FAQPage structured data (JSON-LD, schema.org) for a web page. Use when the user asks for FAQ schema, FAQ markup or FAQPage JSON-LD, wants to add a FAQ section to a page, or wants to check existing FAQ markup. Picks real questions that the page answers visibly, writes the visible FAQ text first if the page has none, then produces JSON-LD whose questions and answers match the visible text. Explains that Google limited FAQ rich results to well-known authoritative government and health sites in 2023, so for most sites the value is clarity for users and machines, with no rich result promised."
---

# FAQ schema generator

You write FAQPage structured data for one web page. Your goal is markup that describes real questions and answers which are visible on the page, word for word, in valid JSON-LD. You also set honest expectations about what the markup does.

Tell the user this early: in 2023 Google limited FAQ rich results to well-known, authoritative government and health websites. For most sites the markup will not produce a rich result. Its value is a clear, consistent description of the page's questions and answers for users and machines. No AI search tool guarantees that it reads structured data either.

## Before you start

Ask the user for anything missing from this list. Do not guess.

1. The page. If you can browse, open the URL and read the visible text and the page source. If not, ask the user to paste the visible text, and the page source if they want existing structured data checked.
2. Real questions customers ask about this topic (from sales calls, support tickets, chat logs), if available.
3. Any JSON-LD already on the page.
4. Whether the same FAQ appears on other pages of the site.

## Steps

1. **Find visible questions and answers.** Look for an existing FAQ section, and for headings written as questions that are followed directly by an answer. Copy each question and its full answer exactly as shown.
2. **Check whether FAQPage fits.** FAQPage is for a page where the site itself provides the questions and the answers. If users submit questions and several people can answer (a forum or community thread), FAQPage is the wrong type; suggest QAPage instead. If the questions are really adverts or sales copy, say they are not suitable.
3. **Choose the questions.** Keep 3 to 10 that are real questions a visitor would ask, are answered fully on the page, and match the user's list of customer questions where possible. Drop questions that only repeat the page heading, questions whose answers are only a link, and promotional questions.
4. **If the page has no visible FAQ**, draft one. Write each question from the page's main topic and the customer questions, and write each answer only from facts already on the page. Answers should be two to four sentences that start with the direct answer. Tell the user that the markup is valid only once this text is published on the page.
5. **Check for duplicates across the site.** If the same question and answer appear on several pages, Google's guidelines say to mark up only one instance. Ask which page should carry it.
6. **Write the JSON-LD.**
   - Use `"@context": "https://schema.org"` and `"@type": "FAQPage"`.
   - Put each question in `mainEntity` as an object with `"@type": "Question"`, `"name"` (the full question text) and `"acceptedAnswer"`, which is an object with `"@type": "Answer"` and `"text"` (the full answer text).
   - Copy question and answer text exactly from the visible page. Whitespace may differ, wording may not.
   - Google supports a limited set of HTML tags inside answer text, including paragraphs, lists, links, line breaks, headings and bold or italic tags. Keep links absolute. Leave out other markup.
   - Escape double quotes and backslashes inside strings. No trailing commas.
7. **Fit it with existing structured data.** If the page already has JSON-LD, either add the FAQPage as a separate script block or combine the items in one `@graph` array. Do not create a second FAQPage on the same page.
8. **Validate in your head, then hand over testing.** Check the JSON is well formed and every required property is present. Tell the user to test the published page in the Schema Markup Validator or Google's Rich Results Test, and to watch for structured data reports in Search Console.

A minimal example of the shape:

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Can I change plans later?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. You can move to a different plan at any time from your account settings."
      }
    }
  ]
}
```

## Output format

Use these sections in this order.

**Summary**: page, number of questions chosen, whether visible FAQ text already exists, and one sentence on what to expect from the markup.

**Chosen questions**: a table with columns Question, Where it appears on the page, Answer matches visible text (yes, or "after publishing" for new text).

**Visible FAQ text** (only if the page has none): the questions and answers ready to paste into the page.

**JSON-LD**: the full markup in one code block, wrapped in `<script type="application/ld+json">` tags.

**Implementation notes**: where to place the script, how it fits with existing markup, and any duplicate-page decision.

**Validation checklist**: a short list of what to test after publishing.

## Quality checks

Before you answer, check that:

- Every `name` and `text` value matches a question and answer visible on the page, or in the new visible FAQ text you wrote.
- The JSON is valid: quotes escaped, no trailing commas, correct nesting.
- There is only one FAQPage on the page.
- No answer adds facts that are not on the page.
- You did not promise rich results, rankings or AI citations.
