Blog
How to Add Opening Hours Schema: JSON-LD Syntax & Implementation
Want a Quick Summary?
Summarize this article instantly with ChatGPT.
Adding opening hours schema markup is a fundamental technical step in local search engine optimization. When search engine bots crawl a commercial website, parsing unstructured text descriptions of working hours can lead to misinterpretation, especially across split shifts, seasonal adjustments, and holiday schedules. Implementing structured data using Schema.org vocabulary eliminates this ambiguity by providing machine-readable schedules directly to search algorithms.
When configured correctly, opening hours structured data feeds directly into search engine knowledge graphs. This enables search engines to accurately display real-time operational statuses, such as "Open now", "Closed today", or "Opens soon at 9:00 AM", within Google Search, Google Maps, voice assistant queries, and localized organic snippets. Providing consistent, programmatic operating hours prevents customer frustration, minimizes bounce rates, and strengthens the overall entity confidence score of your business. Below is an exhaustive technical, syntactic, and architectural guide detailing how to add opening hours schema to your website.
Overview: The 3 Core Architectural Properties for Opening Hours
Schema.org provides multiple properties to declare operating schedules within a LocalBusiness entity:
1. openingHours (Legacy String Array): A concise text-based shorthand format (e.g., "Mo-Fr 09:00-18:00"). While widely supported, it lacks granular control for seasonal overrides, special holidays, and split shifts.
2. openingHoursSpecification (Structured Object): The modern, standard format recommended by Google. It uses nested OpeningHoursSpecification objects to explicitly declare days of the week, opening times, closing times, and valid date ranges.
3. specialOpeningHoursSpecification (Holiday & Exception Handling): A specialized variant of openingHoursSpecification designed to define one-off holiday closures, emergency schedule changes, or extended seasonal hours without altering regular weekly schedules.
Syntax Comparison Matrix: Implementation Methods vs Functional Capabilities
Review this reference matrix evaluating different opening hours schema implementation techniques across flexibility, syntax complexity, and search engine interpretation:
| Implementation Method | Target Schema Property | Syntax Format | Holiday / Exception Support | Google Recommendation Status |
|---|---|---|---|---|
| Nested JSON-LD Objects | openingHoursSpecification |
JSON-LD Array of Objects | Full support via validFrom and validThrough |
Official Recommended Standard |
| Inline Shorthand Strings | openingHours |
Array of Strings (e.g., "Mo-Fr 08:00-17:00") | None; cannot handle holiday overrides | Supported legacy syntax; not ideal for complex schedules |
| Continuous Operations | openingHoursSpecification |
Opens: "00:00", Closes: "23:59" | Applies 24/7 schedules continuously | Standard approach for emergency services and hotels |
| Microdata / RDFa | itemprop="openingHours" |
HTML tags with inline attributes | Complex to maintain and prone to parsing errors | Discouraged; harder to validate than clean JSON-LD |
1. The Gold Standard: Nested openingHoursSpecification via JSON-LD
Google explicitly recommends deploying structured data using JSON-LD embedded inside a <script type="application/ld+json"> tag placed in the head or body of your HTML document. The openingHoursSpecification property takes an array of structured objects defining each day's operating parameters:
Required and Key Optional Properties
@type: Must be set toOpeningHoursSpecification.dayOfWeek: Declares the applicable day or days using Schema.org URIs (such ashttps://schema.org/Monday) or standard day strings ("Monday","Tuesday"). Multiple consecutive days sharing identical hours can be passed as an array of strings.opens: The opening time formatted in 24-hour military time (HH:mmorHH:mm:ss), such as"08:30".closes: The closing time formatted in 24-hour military time (HH:mmorHH:mm:ss), such as"17:30".validFrom/validThrough: Optional ISO 8601 date strings (YYYY-MM-DD) declaring the date range during which these specific hours apply.
Code Example: Standard Weekly Business Schedule (Monday to Friday)
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LegalService",
"@id": "https://example.com/#business-entity",
"name": "Beacon Legal Partners",
"url": "https://example.com",
"telephone": "+1234567890",
"address": {
"@type": "PostalAddress",
"streetAddress": "500 Grand Avenue, Suite 1200",
"addressLocality": "Los Angeles",
"addressRegion": "CA",
"postalCode": "90071",
"addressCountry": "US"
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "08:30",
"closes": "17:30"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": "Saturday",
"opens": "09:00",
"closes": "13:00"
}
]
}
</script>
Note: Days that are not explicitly listed in the schema (in this case, Sunday) are automatically parsed by search engines as closed.
2. Handling Complex Operational Schedules
Many commercial enterprises operate outside standard nine-to-five hours. Below is how to code common complex scheduling models:
Scenario A: Split Shifts (e.g., Restaurants Open for Lunch and Dinner)
If a restaurant opens for lunch, closes in the afternoon, and reopens for dinner service, define two separate OpeningHoursSpecification objects for the identical day:
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"opens": "11:30",
"closes": "14:30"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"opens": "17:30",
"closes": "22:00"
}
]
Scenario B: 24/7 Continuous Operations
For emergency locksmiths, 24-hour veterinary clinics, urgent care centers, or hotel reception desks, span the entire day across all seven days:
"openingHoursSpecification": {
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"opens": "00:00",
"closes": "23:59"
}
Scenario C: Overnight Shifts Closing Past Midnight
If an entertainment venue or bar opens at 20:00 on Friday and closes at 02:00 on Saturday morning, Schema.org syntax requires splitting the schedule at midnight to prevent parser errors in date-time calculation engines:
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": "Friday",
"opens": "20:00",
"closes": "23:59"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": "Saturday",
"opens": "00:00",
"closes": "02:00"
}
]
3. Managing Holidays and Special Hours (specialOpeningHoursSpecification)
To declare temporary schedule modifications, such as holiday closures, extended shopping hours before Christmas, or special Ramadan working hours, deploy the specialOpeningHoursSpecification property alongside your regular schedule. This uses validFrom and validThrough to override standard hours during a specific calendar window:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "DepartmentStore",
"name": "Apex Retail Center",
"url": "https://example.com",
"telephone": "+1234567890",
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"opens": "09:00",
"closes": "20:00"
}
],
"specialOpeningHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"validFrom": "2026-12-24",
"validThrough": "2026-12-24",
"opens": "09:00",
"closes": "15:00"
},
{
"@type": "OpeningHoursSpecification",
"validFrom": "2026-12-25",
"validThrough": "2026-12-25",
"opens": "00:00",
"closes": "00:00"
}
]
}
</script>
Setting both opens and closes to "00:00" explicitly signals to search crawlers that the physical facility is completely closed on that specific holiday date.
4. Technical Validation and Verification Workflow
Deploying schema markup without testing risks syntax bugs, such as missing commas or unescaped quotes, that cause search engines to ignore the structured data entirely:
- Google Rich Results Test: Navigate to the official Google Rich Results Test tool (
search.google.com/test/rich-results). Enter your live landing page URL or paste your raw JSON-LD code snippet directly. Verify that the tool recognizes theLocalBusinessentity and outputs zero critical errors. - Schema.org Validator: Test the code through the Schema Markup Validator (
validator.schema.org) to ensure complete syntax conformance with the broader Schema.org semantic specifications. - Synchronize with External Listings: Ensure your on-page structured data matches the operating hours published on your Google Business Profile, Apple Business Connect, Bing Places, and social media cards. If your schema declares closing at 17:30 but your Google Business Profile displays 19:00, the conflicting signals can trigger algorithmic suppression of your "Open now" status.
Decision Checklist: Complete Opening Hours Schema Audit
Developers, SEO specialists, and technical web teams should audit their structured data implementation against these operational benchmarks:
Mandatory Opening Hours Schema Checklist:
- Structured data deployed using clean JSON-LD syntax inside an application/ld+json script tag.
- Nested
OpeningHoursSpecificationobjects utilized rather than deprecated flat text strings. - Days of the week spelled out completely in English (e.g., "Monday", "Tuesday").
- Opening and closing times formatted in 24-hour military time (HH:mm) with leading zeros.
- Days with zero operating hours (closures) omitted from standard weekly declarations.
- Split shifts declared as separate specification objects covering the same day.
- Shifts extending past midnight divided cleanly into pre-midnight and post-midnight blocks.
- Special holiday hours and closures defined using
validFromandvalidThroughproperties. - Schema validated through the Google Rich Results Test with zero syntax errors.
- Structured hours match visible on-page text and verified Google Business Profile hours exactly.
Conclusion
Adding structured opening hours schema transforms static website schedules into actionable, machine-readable data that search engines can trust. By implementing nested JSON-LD OpeningHoursSpecification objects, properly formatting 24-hour time strings, accounting for split shifts, and defining holiday overrides, businesses eliminate algorithmic confusion. Maintaining accurate, synchronized opening hours across your code and public listings ensures prospective customers always receive reliable operational details, driving local engagement and maximizing conversion opportunities across search results.
Looking for Measurable Business Growth?
Partner with BrandStory for end-to-end digital & creative excellence.
Transform Your Digital Growth with BrandStory
From SEO, PPC, social media marketing, and content marketing to website development, branding, and lead generation, BrandStory delivers result-driven digital marketing services in Dubai and across the UAE, helping businesses attract, engage, and convert more customers.
Trusted by 1000+ leading brands in Dubai and globally including:
Related Blogs
How to Optimise an Existing Page for SEO: On-Page Framework
Optimising an existing web page for search engines is one of the highest-yield initiatives in digital marketing. Unlike ...
How to Show Experience and Expertise on UAE Business Websites: E-E-A-T Architecture
In the digital economy of the United Arab Emirates, establishing demonstrable professional authority is a direct comme...
How to Refresh Old Blog Posts for Rankings: Content Revamp Guide
Content decay is an inevitable reality in organic search. Even articles that once commanded top three positions on Googl...
Arabic and English Page Layout for SEO: The Architecture Guide
Designing and developing a bilingual website that serves both Arabic and English audiences involves far more than simply...
Arabic Heading and Keyword Placement: On-Page SEO Architecture
Structuring on-page content for Arabic-language search engine optimization demands far more than translating high-perf...
Translated Vs. Original Arabic Content for SEO: Technical Analysis
Global brands and multinational enterprises expanding into the Middle East and North Africa (MENA) face a fundamental co...
