FAQ schema generator
Write your questions and answers and get valid FAQPage JSON-LD plus the script tag to paste into your page. Text is escaped and unsafe HTML is removed. Free, and nothing leaves your browser.
How to use it
- Type your content in Questions and answers, each question starting with Q: and each answer with A:.
- Check the number of questions in the Summary.
- Copy the Ready-to-paste script tag into the HTML of the page that shows the same questions.
Guide to FAQ schema markup
What FAQ schema is
FAQ schema is a block of structured data, written in JSON-LD, that tells machines: this page contains these questions and these answers. It uses the FAQPage type from schema.org, with one Question for each question and an Answer inside it. Search engines and AI tools can read it without guessing from the layout of the page. Writing the JSON by hand means balancing braces and escaping quotes, and one missing comma breaks the whole block. This tool builds it from plain text.
What to expect from it
Be realistic about the benefit. Google now shows the expandable FAQ result in search only for well-known, authoritative government and health sites, so most sites will not see it. Valid markup is harmless and gives machines a clean copy of your questions, but it is not a ranking trick. Two rules matter: every question and answer in the markup must also be visible as text on the same page, and the markup must match that text. Hidden or mismatched markup can be treated as spam.
How to write the input
Start each question with Q: and each answer with A:. In Portuguese and Spanish P: and R: work too, and the full words Question, Answer, Pergunta, Resposta, Pregunta and Respuesta are accepted. A question or an answer can continue on the following lines: those lines are joined with a single space. Text before the first question, or a question with no answer, produces an error message that tells you what to fix.
What goes into the answers
Answers may contain simple HTML: links, bold, italic, paragraphs, line breaks, lists and headings. Everything else, including scripts, styles, iframes and event attributes such as onclick, is removed. A link keeps its address only when it starts with http://, https:// or mailto:. Questions are always converted to plain text, with all tags removed.
Worked example
In Questions and answers type these four lines: Q: What is your return policy?, A: Return any item within 30 days., Q: Do you ship abroad? and A: Yes, to <b>40</b> countries.
- The Summary shows Questions in the schema = 2.
- JSON-LD only holds the object with
"@type": "FAQPage"and amainEntitylist of two questions. The second answer keeps its bold tag:Yes, to <b>40</b> countries. - Ready-to-paste script tag wraps the same JSON in
<script type="application/ld+json">. Inside it the characters <, > and & are written as\u003c,\u003eand\u0026, so an answer can never close the script by accident. Browsers and search engines read them as the original characters.
Tips and common mistakes
- Paste the script tag into the page that visibly shows the same questions, in the head or the body. One
FAQPageblock per page is enough. - Do not reuse one FAQ block on many pages where the questions are not displayed.
- Keep answers complete enough to stand alone, but avoid marketing claims you could not defend.
- After publishing, run the page through Google's Rich Results Test or the Schema Markup Validator to confirm the code is read correctly.
Related tools
For other pieces of technical SEO, see the sitemap generator and the robots.txt generator.
Questions
Will this give me FAQ rich results on Google?
Probably not. Google limits FAQ rich results to well-known authoritative government and health sites. The markup is still valid and can help search engines and AI tools understand the page.
Must the FAQ be visible on the page?
Yes. The schema has to match questions and answers that users can actually read on the same page. Hidden or mismatched markup can be treated as spam.
What HTML is allowed in answers?
Only simple tags: links, bold, italic, paragraphs, line breaks, lists, and headings. Scripts, styles, iframes, event handlers and javascript: links are removed.
Where do I paste the script tag?
Anywhere in the HTML of the page, in the head or the body. One FAQPage block per page is enough.