ToolNimba Browse

🍳 Recipe Schema (JSON-LD) Generator

By ToolNimba SEO Team · Updated 2026-06-19

Times (in minutes)

Enter whole minutes. They are converted to ISO 8601 durations like PT1H15M. Leave total blank to use prep + cook.

Ingredients
Instructions (one step per row)
Aggregate rating (optional)

Both fields are needed for a rating block. Only use ratings collected from real users.

 

Paste this block into the head section of the page that shows the recipe (the body works too), then test it in Google's Rich Results Test.

This recipe schema generator builds a valid Recipe JSON-LD block for your page in seconds, no coding needed. Enter the recipe name, image, author, prep and cook times, yield, ingredients and step-by-step instructions, and an optional rating, and the tool outputs a ready-to-paste script tag. Times are converted to the ISO 8601 durations Google expects, and empty fields are dropped so the markup stays clean. Add it to your recipe page to become eligible for the recipe rich result, the eye-catching card with a photo, star rating and cook time that appears in Google search.

What is the Recipe Schema Generator?

Recipe structured data is a block of machine-readable JSON that follows the schema.org Recipe vocabulary. Search engines read it to understand exactly what your page is: the dish name, what goes in it, how to make it, how long it takes and how people rated it. When the markup is present and valid, your page becomes eligible for the recipe rich result, which can show a thumbnail, star rating, review count, total time and calorie count right in the search listing, and can also surface in the recipe carousel and on Google Images.

The data is written as JSON-LD (JSON for Linking Data) inside a script tag with the type application/ld+json. Google recommends JSON-LD over the older inline Microdata and RDFa formats because it sits in one self-contained block and does not get tangled up in your visible HTML. The wrapper is fixed: an @context of https://schema.org and an @type of Recipe, followed by the properties. Required fields for the rich result are the recipe name, at least one image and the recipeIngredient list, while recipeInstructions, prepTime, cookTime, totalTime, recipeYield and aggregateRating are strongly recommended because they fill out the rich card.

Durations in schema.org use the ISO 8601 format, not plain text. Fifteen minutes is PT15M, one hour is PT1H, and one hour fifteen minutes is PT1H15M, where the leading PT marks a period of time. This tool lets you type whole minutes and handles the conversion for you, including totalTime, which it fills automatically from prep plus cook when you leave it blank. One rule that trips people up: the structured data must match what a human sees on the page. The ingredients, steps and rating in your markup have to mirror the visible recipe, or Google may treat the page as misleading and drop the rich result.

When to use it

  • Adding Recipe markup to a food blog post so it qualifies for the rich result with a photo, star rating and cook time.
  • Generating clean JSON-LD for a new recipe page without hand-writing schema or installing a plugin.
  • Converting prep and cook times into the ISO 8601 durations (PT1H15M) that schema.org and Google require.
  • Producing consistent structured data across a recipe site or client project before validating it in the Rich Results Test.

How to use the Recipe Schema Generator

  1. Enter the recipe name and a public image URL (both are required for the rich result).
  2. Add the author, an optional description, category, cuisine and yield.
  3. Type the prep and cook times in whole minutes; leave total blank to add them automatically.
  4. List each ingredient on its own row, then write the method one step per row.
  5. Add a rating value and rating count only if you have genuine user ratings.
  6. Copy the generated script block and paste it into your page, then test it in Google’s Rich Results Test.

Formula & method

Recipe JSON-LD wrapper: { "@context": "https://schema.org", "@type": "Recipe", ... }. Durations use ISO 8601: minutes m become PT(floor(m ÷ 60))H(m mod 60)M, so 75 minutes is PT1H15M. When total time is blank, totalTime = prepTime + cookTime.

Worked examples

A banana bread with 15 minutes prep and 60 minutes cook, no total entered.

  1. prepTime: 15 minutes becomes PT15M
  2. cookTime: 60 minutes becomes PT1H (60 ÷ 60 = 1 hour, 0 minutes)
  3. totalTime is blank, so it is prep + cook = 15 + 60 = 75 minutes
  4. 75 minutes becomes PT1H15M (floor(75 ÷ 60) = 1 hour, 75 mod 60 = 15 minutes)

Result: prepTime PT15M, cookTime PT1H, totalTime PT1H15M

A no-bake dessert with 25 minutes prep, 0 cook, and 4 chill minutes added to prep.

  1. prepTime: 25 minutes becomes PT25M
  2. cookTime: 0 minutes is dropped (a zero or empty duration is omitted)
  3. totalTime is blank, so it is 25 + 0 = 25 minutes
  4. 25 minutes becomes PT25M (0 hours, 25 minutes)

Result: prepTime PT25M, no cookTime, totalTime PT25M

Common Recipe schema properties and what they do

PropertyRequiredExample value
nameYesClassic Banana Bread
imageYeshttps://example.com/banana-bread.jpg
recipeIngredientYes2 cups all-purpose flour
recipeInstructionsRecommendedHowToStep with text
prepTime / cookTime / totalTimeRecommendedPT15M / PT1H / PT1H15M
recipeYieldRecommended1 loaf (8 slices)
authorRecommendedPerson, name
aggregateRatingOptionalratingValue 4.7, ratingCount 215

Minutes to ISO 8601 duration quick reference

MinutesISO 8601 duration
10PT10M
30PT30M
45PT45M
60PT1H
90PT1H30M
150PT2H30M

Common mistakes to avoid

  • Writing times as plain text instead of ISO 8601. Values like "15 minutes" or "1.5 hours" are invalid for prepTime and cookTime. Schema.org requires ISO 8601 durations such as PT15M and PT1H30M. This tool does the conversion for you, but if you edit the output by hand, keep the PT prefix.
  • Markup that does not match the visible page. Google requires structured data to reflect what users actually see. If your JSON-LD lists ingredients, steps or a rating that are not on the page, the rich result can be lost or the page flagged as spammy. Mirror the real content.
  • Inventing or copying an aggregate rating. aggregateRating must come from genuine reviews shown on your own page, not borrowed from another site or made up. Self-serving or fabricated ratings violate Google’s policies and can trigger a manual action. Leave the rating blank if you have none.
  • Forgetting a valid image URL. A recipe with no image rarely earns the rich card, since the thumbnail is its most prominent element. Use a full absolute URL (starting with https) to a high-quality image, ideally in multiple aspect ratios on a real recipe site.
  • Pasting the JSON without the script tag. The Recipe object must sit inside a script element with type application/ld+json. Pasting the bare JSON into HTML does nothing. Copy the whole block this tool outputs, including the opening and closing script tags.

Glossary

Structured data
Machine-readable information added to a page so search engines can understand its content and show richer results.
JSON-LD
JSON for Linking Data, the script-based format Google recommends for adding schema.org markup to a page.
schema.org
A shared vocabulary of types and properties (like Recipe) that search engines agree to read for structured data.
Rich result
An enhanced search listing, for recipes a card with a photo, star rating, review count and cook time.
ISO 8601 duration
A standard time format where periods start with PT, so PT1H15M means one hour and fifteen minutes.
aggregateRating
A schema property summarising user ratings, with a ratingValue and a ratingCount or reviewCount.
HowToStep
The schema type used for each individual instruction in a recipe method.

Frequently asked questions

What is recipe schema markup?

Recipe schema markup is structured data, usually written in JSON-LD, that follows the schema.org Recipe vocabulary. It tells search engines the dish name, ingredients, instructions, times and rating so your page can qualify for the recipe rich result with a photo, stars and cook time in Google search.

Is this recipe JSON-LD generator free?

Yes. The tool is completely free and runs entirely in your browser. Nothing you type is sent to a server, so your recipes stay private. You can generate as many Recipe schema blocks as you like with no sign-up.

How do I add the generated schema to my page?

Copy the full output, including the opening and closing script tags, and paste it into the HTML of the page that shows the recipe. The head section is ideal, but anywhere in the body also works. Then run the page through Google’s Rich Results Test to confirm it is valid.

Why are times shown as PT1H15M?

That is the ISO 8601 duration format that schema.org and Google require for prepTime, cookTime and totalTime. PT marks a period, H is hours and M is minutes, so PT1H15M is one hour and fifteen minutes. You enter plain minutes and the tool converts them automatically.

Do I need a rating for the recipe rich result?

No. A rating is optional. The required fields for the rich result are the recipe name, an image and the ingredient list, with instructions and times strongly recommended. Only add an aggregateRating if you display genuine user reviews on the same page.

Will adding recipe schema guarantee a rich result in Google?

No. Valid markup makes your page eligible, but Google decides whether and when to show a rich result based on quality, relevance and its own systems. Make sure the structured data matches the visible page, use a good image, and validate the code to give yourself the best chance.