Build LocalBusiness JSON-LD with opening hours modelled properly: split shifts, merged day ranges and round-the-clock trading all come out correct.
Most schema generators hand a shop the same flat opening-hours string a 1990s directory would have used, and then a restaurant that shuts between lunch and dinner has nowhere to put the gap. The Local Business Schema Generator writes openingHoursSpecification instead, which is an array of objects rather than a line of text, so a split shift and a half-day Friday are both expressible.
Fill in the name, address and week; the JSON-LD block updates as you type and is ready to paste into the page head. Two things it does that are easy to get wrong by hand: consecutive days sharing identical hours are merged into a single entry with a dayOfWeek array rather than emitted seven times, and round-the-clock trading is written as 00:00 to 23:59, because schema.org has no always-open flag and 24:00 is not a time it accepts.
Closed days produce nothing at all, which surprises people. There is no closed object in the vocabulary; a day with no specification is a day you are shut. The tool lists those days under the output so the absence reads as deliberate rather than as something that went missing.
Press Load Sample and the form fills with Thornbury Lane Bakehouse, a London bakery trading 07:00 to 15:00 on weekdays, 08:00 to 13:00 on Saturday, and closed on Sunday. Seven days of input come out as two openingHoursSpecification entries: one carrying a five-item dayOfWeek array for Monday through Friday, one for Saturday on its own. Sunday appears nowhere in the JSON-LD, and is instead named in the line beneath it. Cycle the sample again and you reach a restaurant whose Tuesday-to-Saturday runs 11:30–14:30 and 17:00–22:00, which comes out as three entries rather than two, because the Sunday lunch service has no dinner sitting to pair with.
dayOfWeek array that skips days is legal but reads as an error to anyone auditing the markup later.dayOfWeek as a plain string; a group holding several emits an array. Both forms are valid, and using the string for a single day keeps the block readable.@type selector offers 25 schema.org subtypes, from Bakery to AccountingService. Picking the narrowest one that fits is worth doing: Dentist tells Google more than LocalBusiness, and both inherit the same address and hours properties.UK into the country field and it is refused: “‘UK’ is not an ISO 3166-1 alpha-2 country code. Google expects the two-letter form, so the United Kingdom is GB and not UK.” The field is checked against all 249 assigned codes.HH:MM only. There is no place for 5:00 PM in this vocabulary, and a value that shape is rejected rather than guessed at.Every required property is present, and the week collapsed into 2 opening-hours entries.
Closed on Sun. Closed days carry no specification in schema.org, so they are absent from the output rather than written out as closed.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Bakery",
"name": "Thornbury Lane Bakehouse",
"url": "https://www.thornburybakehouse.example",
"telephone": "+44 20 7946 0412",
"priceRange": "££",
"address": {
"@type": "PostalAddress",
"streetAddress": "14 Thornbury Lane",
"addressLocality": "London",
"addressRegion": "England",
"postalCode": "E2 8HD",
"addressCountry": "GB"
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "07:00",
"closes": "15:00"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": "Saturday",
"opens": "08:00",
"closes": "13:00"
}
]
}
</script>Structured data describes a page; it does not create a listing. The name, address and phone number here should match what is on the page itself and in your Business Profile, because Google treats a mismatch as a reason to trust none of them. Everything is generated in your browser, so an address you have not published yet stays unpublished.