Local Business Schema Generator
Local Business Schema Generator
Fill in your details and copy ready-to-paste JSON-LD for your business. The code updates as you type and is checked against Google’s local business guidelines.
- Free, no sign-up
- 52 business types
- Hours builder
- Live Google checks
Your JSON-LD
Checks against Google’s guidelines
Runs in your browser. Nothing you type is sent or stored.
Step by step
How to use the local business schema generator
Pick your business type
Choose the most specific option in the list. A dentist should be Dentist, not MedicalClinic or LocalBusiness.
Enter the same details as your Google Business Profile
Your name, address and phone number (NAP) should match your profile and your website character for character. Copy the map pin from Google Maps.
Set your hours
Set each day to open, closed or 24 hours. Days with the same hours are grouped into one block for you.
Clear the checks and copy
Fix anything marked red or amber in the checks panel, then copy the JSON-LD and add it to the page for that location.
Field reference
What each field adds to your schema markup
Google requires only two properties in local business schema markup: name and address. The rest are recommended because they make your listing more complete and easier to trust.
| Field | Schema property | How to fill it | |
|---|---|---|---|
| Business type | @type | The most specific type that describes you. Plumber beats HomeAndConstructionBusiness, which beats LocalBusiness. | Recommended |
| Business name | name | The real-world name. No keywords or city names added on the end. | Required |
| Page URL | url and @id | The page about this location. The tool also writes an @id from it, so other markup on your site can point to the same business. | Recommended |
| Phone | telephone | Your main customer number with country and area code. | Recommended |
| Street, city, region, postal code, country | address (PostalAddress) | The address customers visit. Country is a two-letter ISO code. | Required |
| Latitude and longitude | geo (GeoCoordinates) | Your map pin. Google asks for at least five decimal places. | Recommended |
| Opening hours | openingHoursSpecification | One block for each group of days that share the same hours. | Recommended |
| Price range | priceRange | A range such as $10-25, or currency signs such as $$. Keep it under 100 characters. | Recommended |
| Cuisine, menu, reservations | servesCuisine, menu, acceptsReservations | Shown only for food and drink types. | Recommended for food |
| Photo and logo | image, logo | Full https links to files that are already live on your site. | Optional |
| Profile links | sameAs | Your official profiles, so search engines can connect them to this business. | Optional |
| Areas you serve | areaServed | Towns or regions you travel to, for service-area businesses. | Optional |
Hours
How the generator writes your hours
The tool outputs openingHoursSpecification, the format Google’s structured data documentation uses, rather than the older one-line openingHours text. Special cases are written into the schema the way Google’s rules ask:
| Situation | What to do in the tool | What the code says |
|---|---|---|
| Standard hours | Set the day to Open and enter the times. | "opens": "09:00", "closes": "17:00" |
| Same hours on several days | Grouped into one block automatically. | "dayOfWeek": ["Monday", "Tuesday", …] |
| Open 24 hours | Choose Open 24 hours. | "opens": "00:00", "closes": "23:59" |
| Closed all day | Choose Closed. | "opens": "00:00", "closes": "00:00" |
| Open past midnight | Enter a closing time earlier than the opening time, e.g. 18:00 to 02:00. | "opens": "18:00", "closes": "02:00" |
Closed for lunch or open twice a day? Copy the day’s block in the code and give the second one the afternoon times. For seasonal hours, add validFrom and validThrough dates (YYYY-MM-DD) to the block that changes.
Installing
Add the JSON-LD code to your website
Put the JSON-LD on the page that is about this location, usually your homepage or the location page. Use one block per location.
WordPress
Paste the code into a header-code plugin such as WPCode, set to load in the site header. If Yoast SEO or Rank Math already outputs local business markup, use only one of the two.
Shopify
Go to Online Store, Themes, Edit code, open layout/theme.liquid and paste the code just above </head>.
Wix
In your site dashboard open Settings, then Custom code under Advanced. Add the snippet, place it in Head and apply it to the page about your business.
Squarespace
Use Code Injection and paste the code into the Header field. Code Injection is only on some plans.
Webflow
Open the page’s settings and paste the code into Custom code, Inside <head> tag. Publish the site afterwards.
Plain HTML
Paste the code anywhere inside <head> of the page for that location and upload the file.
Testing
Test the code and fix common errors
Run your structured data through two free testers before it goes live, then check the live page once Google has crawled it.
| If the test shows | Fix |
|---|---|
| Missing field “address” or “name” | Fill business name, street, city and country. These two properties are the only ones Google requires. |
| Invalid value for “telephone” or a phone that won’t parse | Start the number with + and the country code. |
| Coordinates show the wrong spot | Copy latitude and longitude from your Google Maps pin, with at least five decimal places. |
| Two LocalBusiness items detected on the page | Another plugin or theme is adding its own block. Keep one source and remove the other. |
| No items detected | The code isn’t on the tested page yet, or a cache is serving an old version. Clear the cache and test the live URL again. |
FAQ
Questions about the generator
Is this local business schema generator free?
Yes. There is no account, no limit and no email gate. It runs in your browser, so the details you type are never sent to us or stored.
Which business type should I choose?
Choose the most specific type that describes what you do. Google asks for the most specific one available. If your exact type isn’t in the list, pick the closest parent, such as ProfessionalService or Store, and replace the @type value with any other schema.org type before you paste the code.
Can I add reviews or star ratings to the code?
The tool leaves them out on purpose. Google only supports review and rating markup for local businesses on sites that collect reviews about other businesses. Ratings a business adds about itself aren’t eligible for review stars.
My business has no storefront. What should I enter?
Google lists address as required for this markup. Enter the registered address you already use for your business and add the towns you cover under Areas you serve, so the code also tells search engines where you work.
Does the code go in the head or the body?
JSON-LD works in either. Google’s own examples put it in the head, so that is the safest default, and it keeps the code away from page-builder content that may change.
I have several locations. Do I need one code per location?
Yes. Give every location its own page and generate a separate block for each, with that location’s own NAP, URL and hours. Don’t put every branch on the homepage.
I already use Yoast SEO or Rank Math. Do I still need this?
Check first. View the source of your page and search for “LocalBusiness”. If your plugin already outputs it with correct details, you don’t need a second copy. If it doesn’t, or the details are wrong, use this tool and switch the plugin’s local markup off.
Will adding this code put me in the local map pack?
No code can promise that. This markup gives Google your details in a format it can read without guessing, which helps it trust and show them correctly. How much it helps rankings is a bigger question, which we answer in Is Local Business Schema the Key to Local SEO Success?