Xerobit

FAQ Schema Generator for FAQPage JSON-LD Markup

Enter your questions and answers below to generate valid FAQPage JSON-LD structured data. This faq schema generator produces a complete script tag you can paste into your HTML head or body. It runs entirely in your browser, so no content is uploaded anywhere.

JSON-LD Script Tag

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What are your business hours?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "We are open Monday through Friday, 9 AM to 5 PM EST."
      }
    },
    {
      "@type": "Question",
      "name": "Do you offer refunds?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, we offer full refunds within 30 days of purchase."
      }
    }
  ]
}
</script>
  • Questions included
    2
  • Schema type
    FAQPage
  • Format
    JSON-LD

Paste this script tag into the <head> or <body> of your HTML page. Google limited FAQ rich results to government and health sites in 2023 and stopped showing them in Search from May 2026, so this markup no longer produces an FAQ rich result in Google.

How to use the faq schema generator

  1. Enter your first question in the Question 1 field and its corresponding answer in the Answer 1 text area.
  2. Add up to four more question and answer pairs using the remaining fields. Leave any unused fields blank.
  3. The faq schema generator updates automatically as you type, producing valid JSON-LD output below.
  4. Copy the generated <script> block and paste it into the <head> or <body> of your HTML page.

What is FAQPage structured data?

FAQPage is a specific type of structured data defined by Schema.org. When you add this markup to a web page, search engines can parse the questions and answers programmatically. A faq schema generator automates the creation of this markup so you do not have to write the JSON-LD syntax by hand.

The required structure uses the FAQPage type at the root level, containing a mainEntity array. Each item in that array is a Question object, which holds the name (the question text) and an acceptedAnswer property. The accepted answer is itself an Answer object with a text property containing the response.

How the JSON-LD is built

This faqpage schema generator constructs the JSON string step by step. First, it opens the script tag and sets the context to https://schema.org. Then it iterates through every question and answer pair you provided, escaping special characters like double quotes, backslashes, and newlines so the resulting JSON remains valid.

For example, if your question is What does "FAQ" mean?, the tool escapes the inner quotes to produce What does \"FAQ\" mean? inside the JSON string. After assembling all entities into the mainEntity array, it closes the JSON object and wraps everything in a <script type="application/ld+json"> tag. You can verify the result using a tool like the JSON schema validator or Google's Rich Results Test.

Google and FAQ rich results

Google changed how it treats FAQ rich results twice. In August 2023 it limited the expandable question-and-answer display in search results to well-known government and health websites. In May 2026 it went further: its documentation states that the FAQ rich result no longer appears in Google Search from May 7, 2026, and the feature documentation has since been removed.

That means FAQPage markup will not earn a rich result in Google today. It is still valid schema.org vocabulary, other search engines, AI assistants and tools may read it, and it describes your questions and answers in a machine-readable way. Treat it as optional structured data, and expect no change in how your listing looks on Google. Using an faq schema markup generator is therefore about correctness and compatibility, not about winning a rich result.

Common mistakes to avoid

When adding FAQPage markup, several errors can prevent search engines from reading it correctly. The most common issue is invalid JSON caused by unescaped characters. If your answer contains a double quote or a newline character and it is not properly escaped with a backslash, the entire JSON block will fail to parse.

Another mistake is placing promotional content or hidden text inside the answers. The text in your JSON-LD must match the visible content on the page. Structured data should describe content that visitors can actually see on the page, and markup that does not match the page can be treated as a spam violation by search engines. Finally, ensure each question has exactly one accepted answer. Do not nest multiple Question types inside each other.

Reference: Required properties

The following table lists the properties required for valid FAQPage JSON-LD according to Schema.org specifications.

PropertyTypeDescription
@contextTextMust be https://schema.org
@typeTextMust be FAQPage
mainEntityArrayList of Question objects
mainEntity[].@typeTextMust be Question
mainEntity[].nameTextThe full text of the question
mainEntity[].acceptedAnswerObjectThe Answer object
acceptedAnswer.@typeTextMust be Answer
acceptedAnswer.textTextThe full answer text

Worked examples

ExampleInputResult
Basic two-question FAQQuestion 1: What are your business hours?; Answer 1: We are open Monday through Friday, 9 AM to 5 PM EST.; Question 2: Do you offer refunds?; Answer 2: Yes, we offer full refunds within 30 days of purchase.Questions included: 2; Schema type: FAQPage; Format: JSON-LD
Three questions with special charactersQuestion 1: Is shipping free?; Answer 1: Shipping is free for orders over $50. Otherwise, it costs $5.99.; Question 2: Can I use a "promo code"?; Answer 2: Yes! Enter your code at checkout. Use codes like SAVE20 & GET10.; Question 3: Where do you ship?; Answer 3: We ship to all 50 US states and Canada.Questions included: 3; Schema type: FAQPage; Format: JSON-LD
Single question FAQQuestion 1: How do I reset my password?; Answer 1: Click the 'Forgot Password' link on the login page and follow the email instructions.Questions included: 1; Schema type: FAQPage; Format: JSON-LD

FAQ

What is a faq schema generator?

It is a tool that takes plain-text questions and answers and converts them into valid FAQPage JSON-LD structured data wrapped in a script tag, ready to paste into your HTML.

Does this faq schema markup generator work for any website?

Yes, you can add the generated markup to any website, and it is valid FAQPage structured data. Be aware that Google restricted FAQ rich results to government and health sites in 2023 and stopped showing them in Search from May 2026, so the markup will not produce a rich result on Google.

How many questions can I add with this faqpage schema generator?

This tool provides five question and answer fields. If you need more, you can generate multiple script blocks or manually extend the JSON array after copying the output.

Where should I place the generated script tag?

You can place the script tag inside either the head or the body of your HTML document. Search engines will find and parse it in either location.

Do I need to escape quotes in my answers?

No. Type your answers normally. The tool escapes double quotes, backslashes, newlines, control characters and less-than signs so the resulting JSON stays valid and cannot break out of the script tag.

Is there a difference between FAQPage and QAPage schema?

Yes. FAQPage is for pages where the site owner provides both the question and the definitive answer. QAPage is designed for community forums where users submit multiple answers to a single question.

Can I use HTML tags inside the answer text?

Schema.org defines the answer text as plain text, and the generator writes it exactly as typed. Some consumers render basic HTML in answers, but support varies, so plain text is the safest choice. Any less-than sign is written as a JSON escape so that the text cannot end the script tag early.