What this generator builds
Review snippets are the gold stars, rating number and review count that sometimes appear under a search result. They come from two schema.org types. AggregateRating summarises many ratings into an average and a count, and Review describes one person's (or one publication's) verdict. This tool produces either shape: customer ratings nested inside the item they describe, or a standalone review of something you do not sell. It also refuses to build the one combination Google has ruled out, which is a business marking up star ratings for itself.
Star snippets are not guaranteed even with perfect markup. Google decides per query and per site whether to show them. The markup makes a page eligible; the rules below decide whether it stays that way.
Which items can show stars?
Google limits review snippets to a defined list of item types: Book, Course, CreativeWorkSeason, CreativeWorkSeries, Episode, Event, Game, LocalBusiness, MediaObject, Movie, MusicPlaylist, MusicRecording, Organization, Product, Recipe and SoftwareApplication. Ratings attached to anything else, like a WebPage, an Article or a Service, are ignored. If the thing you are rating is not on that list, no amount of markup will produce stars.
Some of those types bring their own requirements. A SoftwareApplication needs an offer with a price (0 for free apps), a Recipe needs an image, and a Product snippet needs the product name. The generator shows the extra fields when you pick those types.
What is the self-serving review rule?
This is the rule that catches most small businesses. Google does not show review stars for LocalBusiness or Organization items when the reviews are published by that same business about itself, on its own website. It makes no difference whether you typed the testimonials in yourself or pulled them in from a third-party review widget: if the page is yours and the subject is your business, the reviews are self-serving and are not eligible.
Because of that, choosing "customer ratings for an item on its own page" together with LocalBusiness or Organization stops this generator from producing code, and it tells you why. The honest alternatives work better anyway:
- Collect reviews on your Google Business Profile, which shows stars in Maps and the local pack without any markup.
- Mark up ratings for the individual products, courses or recipes you sell. Those are eligible on your own site.
- If you run an independent review site that reviews other businesses, use the standalone review mode. That is not self-serving.
Fields a Review or AggregateRating needs
For a single Review
Required: author (a Person or Organization with a valid name under 100 characters), itemReviewed with its name (unless the review is nested inside the item), and reviewRating with a ratingValue. Recommended: datePublished, and bestRating and worstRating when your scale is not 1 to 5. Editorial product reviews can also add positiveNotes and negativeNotes, which Google may show as pros and cons.
For an AggregateRating
Required: itemReviewed (or nesting inside the item), ratingValue, and either ratingCount or reviewCount. Recommended: bestRating and worstRating. The count must be at least one, and the ratings must come directly from users, not be copied from another website.
Nested or standalone: two examples
On your own product page, the ratings belong inside the product. This is what the generator's example produces, cut down to one review:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Aeropress Go Travel Coffee Maker",
"image": "https://example.com/images/aeropress-go.jpg",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.6,
"reviewCount": 312,
"bestRating": 5,
"worstRating": 1
},
"review": [{
"@type": "Review",
"author": { "@type": "Person", "name": "Marco T." },
"reviewRating": { "@type": "Rating", "ratingValue": 5, "bestRating": 5 },
"reviewBody": "Makes great coffee at the campsite.",
"datePublished": "2026-05-14"
}]
}
</script>On a blog or review site where you assess someone else's product, the Review is the main object and the product sits in itemReviewed. Pros and cons are allowed here, because this is an editorial review:
{
"@context": "https://schema.org",
"@type": "Review",
"name": "Aeropress Go review: the best travel brewer we tested",
"itemReviewed": { "@type": "Product", "name": "Aeropress Go" },
"author": { "@type": "Person", "name": "Dana Whitfield" },
"reviewRating": { "@type": "Rating", "ratingValue": 4, "bestRating": 5 },
"datePublished": "2026-08-20",
"positiveNotes": {
"@type": "ItemList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Packs into its own mug" }
]
}
}Can I mark up reviews from Trustpilot or Google?
No. Google asks that ratings be sourced directly from your users on your site. Aggregating scores from other platforms, or quoting your Google rating in markup, is not allowed. Display those badges if you like, but leave them out of the JSON-LD.
Can I mark up only my best reviews?
The aggregate must reflect all the ratings for the item, not a hand-picked selection, and the numbers in the markup must match the numbers visitors see on the page. You can choose which individual reviews to display and mark up, but the average and count cannot be inflated. If your page shows 4.2 from 87 reviews, the markup says 4.2 and 87.
Why do my stars appear and then vanish?
Review snippets are among the most frequently withdrawn rich results, and the cause is rarely a syntax error. Google narrowed where stars appear in 2019, when it introduced the self-serving rule and limited the eligible item types, and it continues to apply quality judgements per site. Typical reasons stars disappear after showing for a while:
- The page was reclassified. A product page that became mostly a blog post, or a category page with ratings for many items, no longer has one clear item for the stars to belong to.
- The markup and the page drifted apart. A plugin update changed how the average is calculated, or reviews were moved behind a "load more" button that renders nothing in the HTML.
- A manual action for spammy structured data. Search Console's Manual actions report will say so explicitly, and it usually covers the whole site.
- Google simply chose not to show them for that query. Eligibility is not a promise, and stars are shown less often on some result types.
Start with Search Console: the Review snippets report shows valid and invalid items, and the Manual actions report rules out a penalty. Then compare the markup with what a visitor sees. Most disappearances are fixed by bringing those two back in line.
Getting rating markup onto the page
WordPress
WooCommerce and most review plugins already output AggregateRating for products when reviews are enabled, so check the page source before adding anything. For other content, such as a recipe or course built with a page builder, add the generated code with a snippet plugin (WPCode or similar) scoped to that single page, and update it when your rating changes. For ratings that change daily, a plugin that generates the markup from live data is better than a pasted static block.
Shopify
Product review apps such as Judge.me, Yotpo and Loox inject rating markup into the product page automatically. Turn that on in the app rather than pasting static numbers, because a hard-coded rating goes stale the moment a new review arrives. Use the generated code as a reference for what correct output looks like.
Google Tag Manager
You can inject a Custom HTML tag with the script on the right page, but for ratings this is the weakest option: the numbers are fixed in the tag and drift away from the page. If you must use GTM, read the live average and count from the page with variables and build the JSON in the tag, then test the rendered result with URL Inspection.
Mistakes that lose stars
- Ratings on the wrong type, such as WebPage, Article or Service. Only the listed item types are eligible.
- Self-serving stars on your own LocalBusiness or Organization, including through embedded review widgets.
- Hidden reviews. Every marked-up review and the aggregate numbers must be visible on the page.
- A rating outside the scale, such as 4.8 when bestRating is 4, or a count of zero.
- Promotional author names like "50% off today". The author must be a real person or organization.
- Pros and cons on merchant pages. Google only uses positiveNotes and negativeNotes from editorial review pages, not shop product pages with customer reviews.
Already have rating markup? Paste a URL into our Review Schema Validator to check it against the same rules before you regenerate anything. If the stars belong to something you sell, build them into the Product Schema Generator output instead, and use the Schema Markup Tester to see every block on the live page at once. Our schema markup guide explains which rich results are still worth chasing.