What is LocalBusiness schema?
Your website tells visitors who you are, where you are and when you are open. Schema markup says the same things in a form that search engines can read without guessing. It is a small block of code, written in a format called JSON-LD, that lists your business name, address, phone number, opening hours and the areas you serve using a shared vocabulary from schema.org.
"LocalBusiness" is the general type. There are also more specific types for many trades and shops, such as Plumber, Electrician, RoofingContractor and Dentist. This generator lets you choose one, fill in your details and copy finished code.
How to use the LocalBusiness schema generator
- Choose the business type. Pick the most specific one that fits. If none does, leave it as LocalBusiness.
- Enter your name, website and phone number. Write them exactly as they appear on your page, and include the country code on the phone number.
- Add your address. Use the same spelling and layout you use everywhere else online.
- Add coordinates if you like. In Google Maps, right-click your location and click the numbers at the top of the menu to copy them.
- Set your opening hours. Use the shortcut buttons to copy Monday to the other weekdays, or to mark the business open all day, every day.
- List the areas you serve and your social profiles if they apply.
- Read the checklist, fix anything marked with an exclamation mark, then click Copy code.
Click "Try an example" to see a finished version with made-up details.
Which details matter most?
Google's guidance for local business markup asks for the business name and address, and it recommends extra details such as the phone number, website address, opening hours, price range and map coordinates. The more of these you can fill in accurately, the more useful the markup is. A short, correct block is better than a long one with guesses in it.
Where to put the code
Paste the whole block, including the script tags, into the page it describes. Google reads JSON-LD in either the head or the body of the page, so use whichever is easier. On a hand-built site, that is just a paste into the HTML. On WordPress, you can add it through your theme's header settings, a plugin that adds custom code to the head, or the schema settings of your SEO plugin. If a plugin already outputs LocalBusiness markup, use one source only, because duplicates can disagree with each other.
How to test your markup
Once the page is live, run its address through Google's Rich Results Test and the Schema Markup Validator. They will point out syntax mistakes and missing fields. A clean test means the code can be read. It does not guarantee any special appearance in search.
Rules to follow
- Match the page. Only mark up details that visitors can see on that page.
- Keep it consistent. Your name, address and phone number should be the same on your website, your Google Business Profile and any directories.
- Use real details. Do not publish an address for a place where you have no real location. Google's guidelines treat fake or virtual addresses as a problem.
- One business per block. If you have several locations, give each its own page and its own markup.
Why this tool leaves out star ratings
You may see other generators add an aggregate rating. Google's guidelines do not allow ratings that a business writes about itself on its own site to be used for review rich results, and made-up ratings are a fast way to lose trust. This tool therefore leaves ratings out on purpose. If you collect genuine reviews through a third-party platform, follow that platform's and Google's current guidelines before marking them up.
Does schema help you rank?
Google has said that structured data is not a direct ranking factor. Its value is that it helps search engines understand your page, and for some types of content it makes the page eligible for rich results. For a local business, your Google Business Profile has a bigger effect on map results. Schema supports it by keeping your details consistent and easy to read. Think of it as good housekeeping rather than a shortcut.
Service-area businesses
If you travel to customers and do not have a public shop, you may not want to publish a street address. You can leave the street blank and list your service areas instead. The checklist will remind you that Google likes a full address, so read its note about service-area businesses and follow the rules that apply to you. Pair this tool with the Heading Structure Analyzer and the Meta Tag Generator and Checker to tidy the rest of the page.
Frequently asked questions
Which business type should I choose?
Choose the most specific type that matches what you do, such as Plumber or Electrician. If none fits, use LocalBusiness. A specific type gives search engines a clearer picture, but a general type is still valid.
Where do I paste the schema code?
Paste the whole block, including the script tags, into the page it describes. Google reads JSON-LD in the head or the body, so either works. Avoid adding the same markup twice through a plugin and by hand.
Do I need latitude and longitude?
No. They are optional, but they help search engines place your business exactly. You can copy them from Google Maps by right-clicking your location.
Why does the tool not include star ratings?
Google's guidelines do not allow ratings that a business writes about itself to be used for review rich results. The tool leaves ratings out so it does not encourage markup that could cause problems.
How do I check that my markup works?
After the page is live, test it with Google's Rich Results Test and the Schema Markup Validator. Both are free and show errors and warnings.
Is my information saved or uploaded?
No. The code is built in your browser, and the details you enter are not sent to or stored by this website.