Your schema code
Updates as you type. Copy the whole block and paste it into your page.
- Copy the code with the button above.
- Use a header and footer scripts plugin, or your SEO plugin’s custom code option, and paste the full block into the head section for the page you want.
- If Yoast or Rank Math already outputs LocalBusiness schema, turn that output off or skip this step so the page does not declare the business twice.
- Save, then test the page URL in the Rich Results Test.
- Copy the code.
- In your Shopify admin, open Online Store, then Themes, then Edit code.
- Open
theme.liquidand paste the block just before the closing</head>tag, then save. - Menu names can change, so check Shopify’s help if the path differs. Then test your home page URL.
- Copy the code.
- In Wix, open the page’s SEO settings, go to the Advanced SEO tab, and look for Structured Data Markup, then add the code there. Alternatively, use Custom Code in your site settings and add it to the head.
- If a field rejects the script tags, paste only the JSON between them.
- Publish the site, then test the live URL. Menu names can change.
- Copy the code.
- Open your page’s HTML file and paste the full block inside the
<head>section, or anywhere in the body. - Upload the file, then test the live URL in the Rich Results Test.
What is LocalBusiness schema and why it matters for local SEO and AI search
LocalBusiness schema is a block of structured data, written in JSON-LD, that describes your business to machines: its name, address, phone number, opening hours, the area it serves, and the services it offers. It uses the shared vocabulary at schema.org, so search engines and AI tools can read your details without guessing from page text.
It matters for two reasons. First, clear, consistent business details support the other local SEO work you do, from your Google Business Profile to your citations. Second, AI assistants and answer engines draw on structured, consistent information when they describe or recommend businesses, so well-labeled data makes your details easier to read correctly. Schema is not a ranking shortcut, but it removes ambiguity. For the wider picture, read our guide to LocalBusiness schema and entity SEO for local businesses.
How to use this schema generator
- Choose your business type from the list, picking the most specific match.
- Fill in the required fields: name, website, and phone. Add an address, or areas served if you work at customers’ locations.
- Add optional details such as hours, map link, profile links, and services. Empty fields are left out.
- Check the status list under the code for missing fields and format warnings.
- Copy the code, paste it into your site, then test it with the buttons provided.
Your progress is saved in your own browser, so a refresh will not lose your entries.
Which business type should you choose?
Pick the most specific schema.org type that describes what you do. A plumbing company should use Plumber, a heating and cooling company HVACBusiness, and a roofer RoofingContractor. If your trade has no specific type, a broader one such as HomeAndConstructionBusiness or ProfessionalService works, and LocalBusiness is the safe generic choice.
Avoid inventing types or using one that does not fit just because it looks popular. Mismatched types are one of the most common mistakes. Keep the type consistent with your Google Business Profile primary category where you can; our guide to choosing profile categories can help.
Service-area businesses: what to include and what to leave out
If you travel to customers and do not serve people at your address, turn on the service-area business option. That removes the street address and postal code from the code, and makes areas served required.
- Include: your business name, website, phone, city and region you are based in, and a list of the cities or regions you actually serve.
- Leave out: a street address you do not show publicly, and areas you do not really serve.
- Keep consistent: your service areas should match what you list on your Google Business Profile. See our guide to Google Business Profile for service area businesses.
How to add schema to your site and test it
Copy the code, then add it to the head of the page that describes your business, usually your home page and contact or location page. The tabs under the generator show steps for WordPress, Shopify, Wix, and plain HTML.
After publishing, test the live page URL. Google’s Rich Results Test shows whether your structured data can be read, and the Schema.org Validator checks the syntax against the vocabulary. Both buttons above open the tools in a new tab and copy your code so you can paste it into the Code option. Fix any errors, retest, and keep the data in step with your profile whenever your hours, phone, or address change.
Common schema mistakes
- Wrong type. Using a type that does not describe the business, or a made-up one.
- NAP that does not match your Google Business Profile. Name, address, and phone should be identical everywhere. See NAP consistency.
- Fake or self-serving review markup. Marking up reviews you wrote about yourself breaks Google’s guidelines and does not earn stars.
- Duplicate schema from plugins. A theme or SEO plugin may already output business schema, so adding more can create conflicting blocks.
- Marking up details that are not on the page, or leaving old hours and phone numbers in place after a change.
If you would rather have an expert set this up and check the rest of your technical foundations, see our website SEO service and Local SEO service.
Frequently asked questions
Does schema improve rankings?
Google says structured data is not a direct ranking factor. What it does is help search engines and AI tools understand who you are, where you operate, and what you offer, and it can make a page eligible for some rich results. Think of it as clear labeling that supports your other local SEO work, not a shortcut to higher rankings.
Where do I put the code?
Paste the full script block into the head of your page, or anywhere in the page body. Google reads JSON-LD in either place. Put it on the page that describes the business, usually the home page and the contact or location page, and keep one LocalBusiness block per page.
Can I use it with Yoast or Rank Math?
Yes, but avoid duplicates. Both plugins can output business schema from their own local SEO settings. If a plugin already outputs your LocalBusiness details, either use the plugin or paste this code, and turn the plugin version off, so the page does not declare the same business twice with different details.
Should every page have LocalBusiness schema?
No. It belongs on pages that describe the business itself, such as the home, contact, and location pages. Blog posts and service pages do not need their own copy. Repeating the same business block everywhere adds noise without much benefit.
What about multiple locations?
Create one schema block per location, and place each on that location’s own page. Each block should carry that branch’s own address, phone number, and hours. Run this generator once for each location and keep the details identical to each location’s Google Business Profile.
Why does Google not show my stars?
Google’s guidelines treat reviews that a business marks up about itself as self-serving, so they do not qualify for review stars in search results for LocalBusiness and similar types. That is why this generator has no review or rating fields. Your real reviews still show on your Google Business Profile.

