Skip to the tool
OnPageKit

Recipe Schema Generator

Recipe JSON-LD with times, steps and nutrition.

required
required, absolute URLs
recommended
recommended
YYYY-MM-DD
hours and minutes
hours and minutes

totalTime is the sum of the two, written for you.

recommended
comma separated
recommended, one per line
recommended, one step per line
numbers only, per serving
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Recipe"
}
</script>
  • No description. A sentence on what makes the dish worth cooking is recommended.
  • No author. Google recommends naming the person or site the recipe comes from.
  • No recipeYield. Say how many servings, as in "4 servings", so the calories have a unit.
  • No recipeIngredient. List one ingredient per line, with its quantity.
  • No recipeInstructions. Write one step per line; each becomes a HowToStep.
  • No calories. nutrition.calories is the one nutrition field Google recommends.

Everything checked above is syntax and schema.org conformance. Whether the recipe card appears is decided by Google against the live page, so run the published URL through its Rich Results Test before counting on it.

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

A recipe schema generator that does the fiddly parts

This recipe schema generator writes the Recipe JSON-LD that powers the cards, carousels and guided-cooking views search engines show for food pages. Fill in the dish, the times and the method, and the block assembles itself on the right, ready to copy into the page. Three parts of recipe structured data are genuinely awkward to write by hand, and the tool handles each of them for you.

Durations. prepTime, cookTime and totalTime are not "20 minutes" or "1h10". They are ISO 8601 durations, written PT20M and PT1H10M. Type hours and minutes as plain numbers and the string is built for you, with 90 minutes rolled up to PT1H30M. The total is calculated rather than typed, so it can never disagree with its own parts.

Ingredients. recipeIngredient is a list of strings, one per ingredient, each with its quantity. Paste the list from your page, one per line, and each line becomes an entry.

Method. recipeInstructions is a sequence of HowToStep objects. Paste the steps one per line; numbering such as 1. or Step 2: is stripped, because the order of the array already carries it. A step split this way is what lets an assistant read the method aloud one instruction at a time.

Required and recommended

Google marks only name and image as required for recipe rich results. The labels above say which of the rest it recommends: author, description, times, yield, ingredients, instructions and calories. Recommended is not decorative here. The recipe card is a small space with slots for a time, a calorie count and a rating, and a result that fills them out-competes one that does not.

Images deserve a note of their own. Google asks for high-resolution photos in three aspect ratios, 16x9, 4x3 and 1x1, so each surface can pick the crop that fits. Add all three URLs of the same photo; the tool warns while there is only one.

Nutrition without unit mistakes

The nutrition property takes a NutritionInformation node, and its values are text with units: 270 calories, 14 g. The most common error in the wild is a unit typed twice, or a comma decimal that a parser reads as two numbers. Here you type the number and the unit is appended, so the output is always in the form the vocabulary expects. Values are per serving, which is why recipeYield is recommended alongside them.

A recipe JSON-LD example to start from

Not sure what a finished block looks like? Fill in a recipe you know, even roughly, and read the output: it is a complete recipe JSON-LD example built from every property you filled in, nested the way the vocabulary defines them. Anything you leave blank is left out rather than emitted empty.

What this checks, and what only Google can

The tool checks syntax, value formats and the fields Google lists. Whether a page earns recipe rich results is judged against the live URL, with the markup matched to what readers see. Once published, run the page through Google's Rich Results Test, or paste the block into the structured data validator to lint it here first. If the recipe sits inside a blog post, the article schema generator covers the post itself, and questions answered under the method belong in the FAQ schema generator.

Frequently asked questions

Which recipe fields does Google actually require?

Only two: name and image. Everything else, from cook times to calories, is listed as recommended. In practice the recommended fields are what fill the card, so a block with just the two required ones qualifies and then loses the carousel to recipes that show a time, a rating and a calorie count.

How do I write 1 hour 30 minutes in recipe schema?

As PT1H30M, an ISO 8601 duration. P opens the duration, T marks the start of the time part, then hours with H and minutes with M. Forty-five minutes is PT45M and two hours is PT2H. This generator writes the string for you from plain hours and minutes, and carries anything over 59 minutes up into hours.

Should totalTime include resting or marinating time?

It should cover the whole wait from starting to eating, so yes. This tool adds prepTime and cookTime together, which is right for most recipes. If yours rests overnight, put the resting time in prepTime; that keeps the three numbers consistent instead of a total that disagrees with its own parts.

Can I add a star rating to my recipe markup?

Only if real readers rated it on the page and the page shows that rating. An aggregateRating invented for the markup is a spam signal and can cost the whole site its rich results. That is why this generator leaves ratings out: add the node from your comments system, which has the real counts.

Does my recipe data leave the browser?

No. The JSON-LD is assembled in the page you are looking at, and nothing you type is uploaded or stored. Close the tab and it is gone.

Related tools

Updated