HowTo structured data for tutorials
The schema.org HowTo type describes a task that a reader completes through a sequence of steps. Marking up tutorials, recipes-as-instructions, and setup guides with HowTo JSON-LD gives search engines an ordered, machine-readable version of your instructions. This builder turns a simple line-per-step list into a fully nested HowTo schema.
How it works
The output object has @type of HowTo with the task name and an optional totalTime in ISO 8601 duration format. Each line you enter becomes a HowToStep object inside the step array, with text set to the step content and a position index reflecting its order. If a line contains a pipe (|), the text before it becomes the step text and the part after becomes that step’s image. Empty lines are skipped so the step list stays clean and correctly numbered.
Tips and example
Write totalTime as a duration: 45 minutes is PT45M. To attach an image, format a line as Tighten the bolt | https://example.com/bolt.jpg. A generated block looks like this:
{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "Set up a Node project",
"totalTime": "PT10M",
"step": [
{
"@type": "HowToStep",
"position": 1,
"text": "Run npm init to create package.json"
},
{
"@type": "HowToStep",
"position": 2,
"text": "Install dependencies with npm install",
"image": "https://example.com/install.png"
}
]
}
Keep the on-page instructions identical to the marked-up steps — structured data must reflect visible content, or it risks being treated as spam.