How to use the FAQ schema generator
- Paste your FAQ into Questions and answers (Q: … / A: …): a line starting “Q:” with the question, then a line starting “A:” with the answer.
- Leave a blank line between pairs if you like; it is optional.
- Choose the Output: <script> tag to paste into HTML, or JSON only for tools that want raw JSON.
- Read any warnings about questions without answers.
- Copy the code or download
faq-schema.htmlorfaq-schema.json.
What it does and when to use it
FAQPage markup tells search engines and other software, in a standard format, which questions a page answers. Writing the JSON by hand is error-prone: one missing comma or quote breaks it. This tool builds it for you from plain text, so you can keep the source in a document and regenerate whenever the FAQ changes.
For other kinds of structured data, such as Organization, Product or Article, use the schema JSON-LD generator. For the title and description tags of the same page, try the meta tag generator. To check other JSON against a schema, use the JSON Schema validator.
How it works
The tool reads your text line by line. A question line starts a new pair and closes the previous one. Answer lines are collected until the next question. Pairs with no answer are skipped and listed in a warning, as are answers that appear before any question.
Each pair becomes a Question with a name and an acceptedAnswer of type Answer whose text is your answer. They sit inside one object with "@context": "https://schema.org" and "@type": "FAQPage", printed with two-space indentation. In the script version, every < is written as \u003c. That stops an answer containing “</script>” from ending the script early, and JSON readers still see the same text. Nothing is sent to a server.
Worked examples
Default delivery FAQ. Three pairs about delivery, returns and shipping give a script tag with three questions. The first is "name": "How long does delivery take?" with the answer “Most orders arrive within 3–5 business days.”
Mixed formats and a missing answer. “Question: Do you deliver on Sundays?”, “Answer - No, Monday to Saturday only.” and “Q: Is there a warranty?” with JSON output. One question is produced, and the warning says “Is there a warranty?” has no answer.
Unsafe characters. An answer “Yes </script> really” becomes "text": "Yes \u003c/script> really" in the script tag.
No questions at all. Text with only “A: orphan answer” returns “No question-and-answer pairs found.” with a hint about the format.
Limits and tips
- Answers are stored as plain text, exactly as typed. Keep them short and factual.
- Only mark up questions that you answer yourself, not questions from users with many answers; schema.org has QAPage for that.
- The JSON-only output does not escape
<. Use the script tag version when pasting straight into HTML.
Frequently asked questions
Will FAQ schema give my page FAQ rich results in Google?
Do the questions have to be visible on the page?
Which line formats does the tool understand?
Where do I paste the script tag?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.