Opening hours schema generator
Enter your hours and holiday closures and this tool writes the LocalBusiness JSON-LD that tells Google when you are open, using openingHoursSpecification for the week and specialOpeningHoursSpecification for holidays. Copy it into your page.
Everything you type stays in your browser. Nothing is sent anywhere.
How to use it
- Type your business name, pick the closest business type, and add your address.
- Set each day's opening and closing time, or tick Closed. Use the second pair of times for a lunch break or split shift.
- List holidays one per line, like
2026-12-25 closedor2026-12-24 08:00-12:00. - Press Generate markup, then copy it or download it as an HTML snippet.
- Paste it into the page that shows your hours, then check it with Google's Rich Results Test.
What the markup says
Days with the same hours are grouped into one OpeningHoursSpecification, which keeps the markup short. Times use 24-hour format (17:00, not 5 pm). A holiday goes in specialOpeningHoursSpecification, the schema.org property for dates that override the normal week, with validFrom and validThrough set to that date. A full-day closure uses opens and closes both 00:00, which is how Google's guide marks a business closed all day. Open 24 hours is 00:00 to 23:59.
| Situation | How it is written |
|---|---|
| Monday to Friday, 9 to 5 | One spec with a list of five days, opens 09:00, closes 17:00 |
| Lunch break | Two specs for that day, one for each stretch |
| Closed on Sunday | Sunday is left out of the weekly specs |
| Closed December 25 | Special spec with 00:00 to 00:00 on that date |
| Short Christmas Eve | Special spec with that date's own hours |
Source: schema.org OpeningHoursSpecification and Google's local business structured data guide.
Common questions
Where do I paste the markup?
Put the whole script block in the head or body of the page that shows your hours, usually the home page or contact page. Most site builders have a custom code or header code box for it.
Does this change my Google Business Profile hours?
No. Your Google Business Profile hours are edited inside Google. The markup lives on your website and gives search engines a second, machine-readable copy, so keep the two the same.
How do I mark a holiday as closed?
Add a line such as 2026-12-25 closed. The tool writes a special opening hours entry for that single date with opens and closes both set to 00:00.
Can I show a lunch break or split shift?
Yes. Fill in the second pair of times for that day. Each stretch becomes its own entry, so Monday can be open 09:00 to 12:00 and again 13:00 to 17:00.
What if we close after midnight or never close?
Enter the closing time as it is, for example open 18:00 and close 02:00. Google's guide writes past-midnight hours as a single entry, which is what the tool does. For a business open 24 hours, set 00:00 to 23:59.
How do I check that it works?
Open Google's Rich Results Test, choose Code, paste the markup, and run it. Fix anything it flags and re-generate here.
No website to paste this into?
Frankford & Marsh builds a finished site for local businesses, with your hours, address and local markup already in place, for a flat $995. We build a free preview first so you can see it before you pay.