LocalBusiness schema generator
Generate LocalBusiness JSON-LD with address, hours and geo coordinates, using the specific business subtype.
A more specific type earns more specific rich results than plain LocalBusiness.
A rough band, not a figure. Two or three symbols is the convention.
Schema.org format: day range, then times. Put Saturday on its own line.
JSON-LD
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness"
}
</script>Before you ship this
- Error: Business name is required by Google for this type.
- Error: Street address is required by Google for this type.
- Error: City is required by Google for this type.
- Error: Postcode is required by Google for this type.
How to use it
- Pick the business type. The specific subtype carries more meaning than the generic LocalBusiness.
- Enter the name, full address and telephone exactly as they appear on your Google Business Profile.
- Add opening hours, price range and, if you have them, latitude and longitude.
- Copy the generated script tag and paste it into the page head, then confirm it with the Google Rich Results Test.
Pick the most specific type you can
LocalBusiness works, but schema.org has a deep subtype tree beneath it: Dentist, Plumber, Restaurant, LegalService and dozens more. A specific type tells Google what you do as well as where you are, and some subtypes unlock fields the generic type has no slot for.
The selector above covers the common branches. If your trade has an exact match on schema.org that is not listed, the generated markup is still correct. Change the @type value by hand.
This does not replace your Business Profile
For local pack rankings your Google Business Profile is the primary source and this markup is corroboration. It helps Google match your site to the right entity and confirms your details, but no amount of it compensates for an unverified or incomplete profile.
Name, address and phone must match your Business Profile exactly: same abbreviations, same suite format, same phone formatting. Inconsistency between the two is the most common reason this markup does nothing.
Opening hours and multiple locations
Hours use the schema.org shorthand, Mo-Fr 09:00-17:00, with different days on separate lines and 24-hour times. For a day you are closed, omit it rather than marking it closed.
One markup block per physical location, each on its own page. Do not list several branches in one LocalBusiness block. Give each a location page and mark up that page.
LocalBusiness schema generator FAQ
Does LocalBusiness schema improve local rankings?
Not directly, and it does not replace a Google Business Profile. What it does is confirm that the name, address and phone number on your site match the profile, which removes a common source of doubt.
Which subtype should I use?
The most specific one that fits. Restaurant, Store or LegalService tell Google more than LocalBusiness does, and the specific types inherit everything the generic one supports.
Will my opening hours appear in search?
They can, but Google usually takes hours from your Business Profile. Marking them up keeps the two sources consistent, which matters most when they disagree.
Should this go on the homepage or on a location page?
On the page that represents that location. A single-site business can put it on the homepage; a business with branches needs one page per branch, each with its own markup. One homepage block listing six addresses tells a search engine very little about any of them.
Do I need latitude and longitude?
They are optional and worth adding where the address alone is ambiguous — a rural property, a unit on a trading estate, a building with several entrances. For a high street address that geocodes cleanly, they add nothing.
Can I include a star rating in the markup?
Only for reviews genuinely collected and displayed on your own site, and even then Google ignores self-serving review markup for LocalBusiness — ratings about the business itself, on the business own site, are specifically excluded. Marking up your Google rating here is both pointless and a policy breach.
What if the business has no premises customers visit?
Use the service area form: state the regions you cover rather than a street address people cannot come to. This matches how your Business Profile should be configured too, and the two disagreeing is a common reason a listing behaves oddly in the map results.
How do I mark up holiday hours?
With the special opening hours field, which takes a date range and the hours for it, including a closed flag. It is one of the few parts of this markup that visibly helps a customer, and it is worth updating twice a year rather than letting the regular hours be wrong for a week.
Does the markup have to match my Google Business Profile exactly?
The name, address and phone number should match character for character, including whether you write Street or St. The profile is the authority for the map results; the markup is corroboration. Two versions that nearly agree are worse than one version stated consistently everywhere.
Does NAP consistency across other sites still matter?
Less than it did a decade ago, when citation counting was a large part of local ranking, but inconsistency still causes real problems — wrong phone numbers on directory sites outlive the business that changed them. Fix the large directories and ignore the long tail.