By Tim King · Updated
Local Business Schema Generator
LocalBusiness JSON-LD With Address, Geo Coordinates, Opening Hours and Social Profiles
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Local Business Schema Generator works
This local business schema generator writes LocalBusiness JSON-LD. Choose the business type, fill in the address, phone, coordinates and opening hours, list the
social and directory profiles that belong to the business, and copy the script tag. Hours are
written the way you would on a sign — Mo-Fr 09:00-17:30, Sa 10:00-14:00, Su closed — and
become OpeningHoursSpecification entries. The status line names any property Google requires
that is still empty.
Local business schema generator: required fields
LocalBusiness structured data tells search engines the facts about a physical business: what
it is called, what kind of business it is, where it is, how to reach it and when it is open.
Google reads it to build and corroborate the knowledge panel, to show hours and phone number in
results, and to match the website to the Google Business Profile. It is the single most useful
piece of markup a shop, restaurant, clinic or trade can add, and the single most error-prone,
because hours and addresses have strict formats.
The type. LocalBusiness is the generic type and always valid. The subtypes — Restaurant,
Dentist, Plumber, HairSalon — are more specific and let search engines apply the right
expectations, such as menus for restaurants or accepted insurance for medical practices. Pick the
closest match; when nothing fits, use LocalBusiness or ProfessionalService. Do not pick a
subtype for its ranking value; there is none.
Address. Split across streetAddress, addressLocality, addressRegion, postalCode and
addressCountry. The country should be an ISO two-letter code — GB, US, DE — not the name.
The region is the state or county where that is part of the postal address, and can be empty
where it is not, as in most UK addresses. The address must match your Google Business Profile
and the address shown on the page character for character; inconsistencies are what cause
verification problems.
Phone and coordinates. The telephone should be in international format beginning with +
and the country code; the tool warns if it is not. Latitude and longitude are optional but
recommended — they place the business precisely where a postcode can only place it roughly.
Right-click the location in Google Maps and the coordinates are the first item in the menu.
Opening hours. One rule per line: a day or day range, a space, then open-close in 24-hour
time, or the word closed. Days are Mo Tu We Th Fr Sa Su or full names; ranges use a hyphen
and lists use commas, so Mo-Fr 09:00-17:00, Sa,Su 10:00-16:00 and Tue,Thu 12:00-20:00 all
work. Split shifts are two rules for the same day. A closed day is emitted with 00:00 to
00:00, which is the schema.org convention. Public holidays and seasonal hours need
validFrom/validThrough on a specification, which the tool does not add; put them in the
business profile instead.
Profiles. sameAs links the business to its other identities on the web — Facebook,
Instagram, LinkedIn, Yelp, Tripadvisor, the Google Business Profile — which helps search engines
merge them into one entity. Include only profiles you control or that are unambiguously this
business. hasMap can point at the Google Maps listing.
Price range. A rough indication using currency symbols — £, ££, £££ — or a range like
£10-£30. Google shows it in the knowledge panel. Leave it blank if it does not apply.
Where it goes and what to check. Paste into the home page or the contact page — the page
that shows the address — not into every page. Then check the page with the schema validator on
this site or Google's Rich Results Test. The required properties for the local business rich
result are name, address and image; the tool warns if any are missing.
FAQ
Should I add this to every page of the site?
No. Put it on the page that displays the business details — usually the home page or the contact page. Repeating it on every page is not wrong but adds nothing, and a site with several locations should give each location its own page with its own markup.
What if the business has several branches?
One LocalBusiness per branch, each on its own page with its own address and hours. Use the
Organization type for the parent company on the home page and link the branches from it. A
single block claiming several addresses is invalid.
How do I write hours that cross midnight?
Write the closing time as it is — Fr 18:00-02:00. schema.org's convention is that a closing
time earlier than the opening time means the following morning, and Google reads it that way. If
that seems ambiguous for your case, split into Fr 18:00-23:59 and Sa 00:00-02:00.
Where do I get the coordinates?
Find the business on Google Maps, right-click the exact spot and the first item in the menu is the latitude and longitude — click to copy. Six decimal places is plenty. Latitude comes first; a value outside ±90 for latitude or ±180 for longitude is flagged.
Does this replace a Google Business Profile?
No. The profile is where Google gets most of its local information; the markup corroborates it from your own site. They should agree in every detail — name, address, phone, hours — and when they disagree, the profile usually wins and the markup is ignored.
See also: all SEO tools, Dev Utilities, Formatters & Validators, Data & Encoding, Security & Identifiers, Accessibility, AI.
Related tools
Hreflang Generator
Generate hreflang link tags, headers or sitemap XML for multilingual pages.
Meta Description Generator
Draft meta descriptions from your own page text, trimmed to length.
Redirect Generator
Turn an old-to-new URL list into 301 rules for Apache, Nginx, Netlify and Vercel.
Robots.txt Checker
Check a robots.txt file line by line before you deploy it.
Sitemap Validator
Validate sitemap.xml and sitemap index files against the sitemaps.org protocol.